Index: remoting/host/chromoting_host.cc |
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc |
index a1285544f05a6d4bdfc8004108a684e10209688b..1c90477f02e9838d3dd9ec8afde087829ecf0c2d 100644 |
--- a/remoting/host/chromoting_host.cc |
+++ b/remoting/host/chromoting_host.cc |
@@ -254,15 +254,20 @@ void ChromotingHost::OnSessionClosed(ClientSession* client) { |
recorder_->RemoveConnection(client->connection()); |
} |
- FOR_EACH_OBSERVER(HostStatusObserver, status_observers_, |
- OnClientDisconnected(client->client_jid())); |
- |
- if (recorder_.get()) { |
- // Currently we don't allow more than one simultaneous connection, |
- // so we need to shutdown recorder when a client disconnects. |
- StopScreenRecorder(); |
+ if (client->is_authenticated()) { |
+ FOR_EACH_OBSERVER(HostStatusObserver, status_observers_, |
+ OnClientDisconnected(client->client_jid())); |
+ |
+ // TODO(sergeyu): This teardown logic belongs to ClientSession |
+ // class. It should start/stop screen recorder or tell the host |
+ // when to do it. |
+ if (recorder_.get()) { |
+ // Currently we don't allow more than one simultaneous connection, |
+ // so we need to shutdown recorder when a client disconnects. |
+ StopScreenRecorder(); |
+ } |
+ desktop_environment_->OnSessionFinished(); |
} |
- desktop_environment_->OnSessionFinished(); |
} |
void ChromotingHost::OnSessionSequenceNumber(ClientSession* session, |