| Index: mojo/edk/system/routed_raw_channel.cc
|
| diff --git a/mojo/edk/system/routed_raw_channel.cc b/mojo/edk/system/routed_raw_channel.cc
|
| index 825fc2fac30d36b2982b4a497fed78c98d07d893..5bb89a582e898801aa3625b486d5cd880fd2d767 100644
|
| --- a/mojo/edk/system/routed_raw_channel.cc
|
| +++ b/mojo/edk/system/routed_raw_channel.cc
|
| @@ -131,9 +131,14 @@ void RoutedRawChannel::OnReadMessage(
|
|
|
| void RoutedRawChannel::OnError(Error error) {
|
| DCHECK(internal::g_io_thread_task_runner->RunsTasksOnCurrentThread());
|
| +
|
| + // This needs to match non-multiplexed MessagePipeDispatcher's destruction of
|
| + // the channel only when read errors occur.
|
| + if (error != ERROR_WRITE) {
|
| + channel_->Shutdown();
|
| + channel_ = nullptr;
|
| + }
|
|
|
| - channel_->Shutdown();
|
| - channel_ = nullptr;
|
| if (routes_.empty()) {
|
| delete this;
|
| return;
|
|
|