Index: mojo/public/cpp/bindings/lib/connector.cc |
diff --git a/mojo/public/cpp/bindings/lib/connector.cc b/mojo/public/cpp/bindings/lib/connector.cc |
index 319631cbdf8cc8c0d281c2d3c9d8ed7ba4377e76..17f960442fee36f2ff31c9db129f0512babc4321 100644 |
--- a/mojo/public/cpp/bindings/lib/connector.cc |
+++ b/mojo/public/cpp/bindings/lib/connector.cc |
@@ -114,12 +114,14 @@ void Connector::ReadMore() { |
while (true) { |
MojoResult rv; |
- rv = ReadAndDispatchMessage(message_pipe_.get(), incoming_receiver_, NULL); |
+ bool receiver_result; |
+ rv = ReadAndDispatchMessage(message_pipe_.get(), incoming_receiver_, |
+ &receiver_result); |
if (rv == MOJO_RESULT_SHOULD_WAIT) { |
WaitToReadMore(); |
break; |
} |
- if (rv != MOJO_RESULT_OK) { |
+ if (rv != MOJO_RESULT_OK || !receiver_result) { |
error_ = true; |
break; |
} |