mirror of
https://github.com/zulip/zulip.git
synced 2025-10-29 02:53:52 +00:00
Add on-close callback immediately after creating
(imported from commit 221f8c6306ef9b6c658d10b72e15dcfba83017e0)
This commit is contained in:
@@ -116,6 +116,7 @@ class TornadoQueueClient(SimpleQueueClient):
|
||||
self._get_parameters(),
|
||||
on_open_callback = self._on_open,
|
||||
stop_ioloop_on_close = False)
|
||||
self.connection.add_on_close_callback(self._on_connection_closed)
|
||||
|
||||
def _reconnect(self, on_open_cb = None):
|
||||
self.connection = None
|
||||
@@ -124,7 +125,6 @@ class TornadoQueueClient(SimpleQueueClient):
|
||||
self._connect(on_open_cb)
|
||||
|
||||
def _on_open(self, connection):
|
||||
self.connection.add_on_close_callback(self._on_connection_closed)
|
||||
self.connection.channel(
|
||||
on_open_callback = self._on_channel_open)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user