Index: remoting/host/chromoting_host.cc |
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc |
index a1285544f05a6d4bdfc8004108a684e10209688b..0bcaf1f04c536536aec4c516d7964d98cf79fce3 100644 |
--- a/remoting/host/chromoting_host.cc |
+++ b/remoting/host/chromoting_host.cc |
@@ -250,19 +250,21 @@ void ChromotingHost::OnSessionClosed(ClientSession* client) { |
CHECK(it != clients_.end()); |
clients_.erase(it); |
- if (recorder_.get()) { |
- recorder_->RemoveConnection(client->connection()); |
- } |
+ if (client->is_authenticated()) { |
+ if (recorder_.get()) { |
+ recorder_->RemoveConnection(client->connection()); |
Wez
2012/05/18 20:20:57
nit: It should be safe to RemoveConnection() for a
Sergey Ulanov
2012/05/21 18:20:13
It doesn't make sense to remove the connection if
Wez
2012/05/21 20:33:50
True, but you're testing whether |recorder_| is se
Sergey Ulanov
2012/05/21 22:27:55
Done.
|
+ } |
- FOR_EACH_OBSERVER(HostStatusObserver, status_observers_, |
- OnClientDisconnected(client->client_jid())); |
+ FOR_EACH_OBSERVER(HostStatusObserver, status_observers_, |
+ OnClientDisconnected(client->client_jid())); |
Wez
2012/05/18 20:20:57
This changes the semantics of OnClientDisconnected
Sergey Ulanov
2012/05/21 18:20:13
Yes. I think for such clients the observers will s
|
- 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 (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, |