mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	Actually fix main Tornado memory leak of handler objects.
This line appears to have been lost in rebasing from the original implementation of 1396eb7022faec4c2d91553800a35781a96dd5bd; so the previous fix actually only addressed the issue in a rare exception case.
This commit is contained in:
		@@ -163,6 +163,7 @@ class ClientDescriptor(object):
 | 
				
			|||||||
    def disconnect_handler(self, client_closed=False):
 | 
					    def disconnect_handler(self, client_closed=False):
 | 
				
			||||||
        if self.current_handler_id:
 | 
					        if self.current_handler_id:
 | 
				
			||||||
            clear_descriptor_by_handler_id(self.current_handler_id, None)
 | 
					            clear_descriptor_by_handler_id(self.current_handler_id, None)
 | 
				
			||||||
 | 
					            clear_handler_by_id(self.current_handler_id)
 | 
				
			||||||
            if client_closed:
 | 
					            if client_closed:
 | 
				
			||||||
                logging.info("Client disconnected for queue %s (%s via %s)" %
 | 
					                logging.info("Client disconnected for queue %s (%s via %s)" %
 | 
				
			||||||
                             (self.event_queue.id, self.user_profile_email,
 | 
					                             (self.event_queue.id, self.user_profile_email,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user