From 673f497a6fd1c810f4db16e23ffece1d0604e49a Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Fri, 8 Nov 2013 17:13:55 -0500 Subject: [PATCH] socket: Only deregister connections that have been registered (imported from commit bfaed299a129bac1e901883f5c6e3339f5a8b688) --- zerver/lib/socket.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zerver/lib/socket.py b/zerver/lib/socket.py index c849e1ed03503..011d09fdb12d0 100644 --- a/zerver/lib/socket.py +++ b/zerver/lib/socket.py @@ -171,7 +171,6 @@ def on_message(self, msg): fake_message_sender) def on_close(self): - deregister_connection(self) log_data = dict(extra='[transport=%s]' % (self.session.transport_name,)) record_request_start_data(log_data) if self.session.user_profile is None: @@ -180,6 +179,7 @@ def on_close(self): client_name='?', status_code=408, error_content='Timeout while waiting for authentication') else: + deregister_connection(self) write_log_line(log_data, path='/socket/close', method='SOCKET', remote_ip=self.session.conn_info.ip, email='unknown', client_name='?')