diff options
-rw-r--r-- | remoting/client/chromoting_client.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/remoting/client/chromoting_client.cc b/remoting/client/chromoting_client.cc index 327afa0..e50d95d3 100644 --- a/remoting/client/chromoting_client.cc +++ b/remoting/client/chromoting_client.cc @@ -64,6 +64,12 @@ void ChromotingClient::Stop(const base::Closure& shutdown_task) { return; } + // Drop all pending packets. + while(!received_packets_.empty()) { + received_packets_.front().done.Run(); + received_packets_.pop_front(); + } + connection_->Disconnect(base::Bind(&ChromotingClient::OnDisconnected, base::Unretained(this), shutdown_task)); } |