| Index: ipc/ipc_channel_posix.cc
|
| diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc
|
| index a74178a694b99dbaf4e759e30e195461a29d30ef..bd3d4fef8a63b4317f0dd6dbd60930cec6b0fa16 100644
|
| --- a/ipc/ipc_channel_posix.cc
|
| +++ b/ipc/ipc_channel_posix.cc
|
| @@ -31,6 +31,7 @@
|
| #include "base/posix/global_descriptors.h"
|
| #include "base/process/process_handle.h"
|
| #include "base/rand_util.h"
|
| +#include "base/run_loop.h"
|
| #include "base/stl_util.h"
|
| #include "base/strings/string_util.h"
|
| #include "base/synchronization/lock.h"
|
| @@ -522,7 +523,10 @@ bool Channel::ChannelImpl::Send(Message* message) {
|
| message->TraceMessageBegin();
|
| output_queue_.push(message);
|
| if (!is_blocked_on_write_ && !waiting_connect_) {
|
| - return ProcessOutgoingMessages();
|
| + if (!ProcessOutgoingMessages()) {
|
| + ClosePipeOnError();
|
| + return false;
|
| + }
|
| }
|
|
|
| return true;
|
| @@ -707,7 +711,11 @@ bool Channel::ChannelImpl::AcceptConnection() {
|
| // In server mode we will send a hello message when we receive one from a
|
| // client.
|
| waiting_connect_ = false;
|
| - return ProcessOutgoingMessages();
|
| + if (!ProcessOutgoingMessages()) {
|
| + ClosePipeOnError();
|
| + return false;
|
| + }
|
| + return true;
|
| } else if (mode_ & MODE_SERVER_FLAG) {
|
| waiting_connect_ = true;
|
| return true;
|
|
|