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

Unified Diff: remoting/protocol/channel_dispatcher_base.cc

Issue 1143443003: Fix MessageReader to pass errors to the channel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « remoting/protocol/channel_dispatcher_base.h ('k') | remoting/protocol/channel_multiplexer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/channel_dispatcher_base.cc
diff --git a/remoting/protocol/channel_dispatcher_base.cc b/remoting/protocol/channel_dispatcher_base.cc
index ee90ee56dcbc7bc02756ebf80e919e90889d6cbd..575b1e57913206218e774cd82976e21ce29f2745 100644
--- a/remoting/protocol/channel_dispatcher_base.cc
+++ b/remoting/protocol/channel_dispatcher_base.cc
@@ -57,14 +57,17 @@ void ChannelDispatcherBase::OnChannelReady(
channel_factory_ = nullptr;
channel_ = socket.Pass();
- writer_.Init(channel_.get(), base::Bind(&ChannelDispatcherBase::OnWriteFailed,
- base::Unretained(this)));
- reader_.StartReading(channel_.get());
+ writer_.Init(channel_.get(),
+ base::Bind(&ChannelDispatcherBase::OnReadWriteFailed,
+ base::Unretained(this)));
+ reader_.StartReading(channel_.get(),
+ base::Bind(&ChannelDispatcherBase::OnReadWriteFailed,
+ base::Unretained(this)));
event_handler_->OnChannelInitialized(this);
}
-void ChannelDispatcherBase::OnWriteFailed(int error) {
+void ChannelDispatcherBase::OnReadWriteFailed(int error) {
event_handler_->OnChannelError(this, CHANNEL_CONNECTION_ERROR);
}
« no previous file with comments | « remoting/protocol/channel_dispatcher_base.h ('k') | remoting/protocol/channel_multiplexer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698