Index: mojo/edk/embedder/platform_channel_utils_posix.cc |
diff --git a/mojo/edk/embedder/platform_channel_utils_posix.cc b/mojo/edk/embedder/platform_channel_utils_posix.cc |
index ef718d5bcc17627c81b7a2c08007f359a79f3442..90bfdf041673cb5e55e71c7dac569b1b697a4d03 100644 |
--- a/mojo/edk/embedder/platform_channel_utils_posix.cc |
+++ b/mojo/edk/embedder/platform_channel_utils_posix.cc |
@@ -147,7 +147,8 @@ bool PlatformChannelSendHandles(PlatformHandle h, |
ssize_t PlatformChannelRecvmsg(PlatformHandle h, |
void* buf, |
size_t num_bytes, |
- std::deque<PlatformHandle>* platform_handles) { |
+ std::deque<PlatformHandle>* platform_handles, |
+ bool should_block) { |
DCHECK(buf); |
DCHECK_GT(num_bytes, 0u); |
DCHECK(platform_handles); |
@@ -166,7 +167,8 @@ ssize_t PlatformChannelRecvmsg(PlatformHandle h, |
int id = 0; |
socklen_t peek_off_size = sizeof(id); |
getsockopt(h.handle, SOL_SOCKET, SO_PEEK_OFF, &id, &peek_off_size); |
- ssize_t result = HANDLE_EINTR(recvmsg(h.handle, &msg, MSG_DONTWAIT)); |
+ ssize_t result = |
+ HANDLE_EINTR(recvmsg(h.handle, &msg, should_block ? 0 : MSG_DONTWAIT)); |
if (result < 0) |
return result; |