Index: remoting/protocol/channel_multiplexer.cc |
diff --git a/remoting/protocol/channel_multiplexer.cc b/remoting/protocol/channel_multiplexer.cc |
index 62bb9d2902931d9b5e9b4baeb23699351e34146b..8d885fe28f05765d7c697f01138a0f86688f2e2f 100644 |
--- a/remoting/protocol/channel_multiplexer.cc |
+++ b/remoting/protocol/channel_multiplexer.cc |
@@ -348,6 +348,9 @@ ChannelMultiplexer::ChannelMultiplexer(StreamChannelFactory* factory, |
: base_channel_factory_(factory), |
base_channel_name_(base_channel_name), |
next_channel_id_(0), |
+ parser_(base::Bind(&ChannelMultiplexer::OnIncomingPacket, |
+ base::Unretained(this)), |
+ &reader_), |
weak_factory_(this) { |
} |
@@ -400,9 +403,7 @@ void ChannelMultiplexer::OnBaseChannelReady( |
if (base_channel_.get()) { |
// Initialize reader and writer. |
- reader_.Init(base_channel_.get(), |
- base::Bind(&ChannelMultiplexer::OnIncomingPacket, |
- base::Unretained(this))); |
+ reader_.StartReading(base_channel_.get()); |
writer_.Init(base_channel_.get(), |
base::Bind(&ChannelMultiplexer::OnWriteFailed, |
base::Unretained(this))); |