Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(766)

Unified Diff: ipc/mojo/ipc_message_pipe_reader.cc

Issue 1023043002: ChannelMojo: Let MessagePipeReader wait "peer closed" signal as well. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/mojo/ipc_message_pipe_reader.cc
diff --git a/ipc/mojo/ipc_message_pipe_reader.cc b/ipc/mojo/ipc_message_pipe_reader.cc
index 61b36f6f384531dd68e0d7358f59889e5dca00d0..cfa53f30e6aacdf32e71748e0cefe47817c0fbe4 100644
--- a/ipc/mojo/ipc_message_pipe_reader.cc
+++ b/ipc/mojo/ipc_message_pipe_reader.cc
@@ -161,8 +161,9 @@ void MessagePipeReader::ReadMessagesThenWait() {
// If can fail with |MOJO_RESULT_ALREADY_EXISTS| otherwise.
// Also, we don't use MOJO_HANDLE_SIGNAL_WRITABLE here, expecting buffer in
// MessagePipe.
- MojoResult result =
- async_waiter_->Wait(pipe_.get().value(), MOJO_HANDLE_SIGNAL_READABLE);
+ MojoResult result = async_waiter_->Wait(
+ pipe_.get().value(),
+ MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_PEER_CLOSED);
viettrungluu 2015/03/24 21:03:25 So if it gets signaled due to "peer closed" ... th
// If the result is |MOJO_RESULT_ALREADY_EXISTS|, there could be messages
// that have been arrived after the last |ReadAvailableMessages()|.
// We have to consume then and retry in that case.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698