| Index: remoting/host/chromoting_host.cc
|
| diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
|
| index 1bc7b984f2d362aacc076c16d7bc1b6fd0634042..390096c48f1b029717bbdbd9a1497b637872f309 100644
|
| --- a/remoting/host/chromoting_host.cc
|
| +++ b/remoting/host/chromoting_host.cc
|
| @@ -76,6 +76,7 @@ void ChromotingHost::OnClientConnected(ClientConnection* client) {
|
| } else {
|
| // If a session manager already exists we simply add the new client.
|
| session_->AddClient(client);
|
| + session_->Start();
|
| }
|
| }
|
|
|
| @@ -89,6 +90,9 @@ void ChromotingHost::OnClientDisconnected(ClientConnection* client) {
|
| session_->Pause();
|
| }
|
|
|
| + // Close the connection to client just to be safe.
|
| + client->Disconnect();
|
| +
|
| // Also remove reference to ClientConnection from this object.
|
| client_ = NULL;
|
| }
|
| @@ -117,7 +121,6 @@ void ChromotingHost::OnConnectionOpened(ClientConnection* client) {
|
| void ChromotingHost::OnConnectionClosed(ClientConnection* client) {
|
| DCHECK_EQ(context_->main_message_loop(), MessageLoop::current());
|
|
|
| - // Completes the client connection.
|
| LOG(INFO) << "Connection to client closed.";
|
| OnClientDisconnected(client_.get());
|
| }
|
| @@ -125,7 +128,6 @@ void ChromotingHost::OnConnectionClosed(ClientConnection* client) {
|
| void ChromotingHost::OnConnectionFailed(ClientConnection* client) {
|
| DCHECK_EQ(context_->main_message_loop(), MessageLoop::current());
|
|
|
| - // The client has disconnected.
|
| LOG(ERROR) << "Connection failed unexpectedly.";
|
| OnClientDisconnected(client_.get());
|
| }
|
|
|