Skip to content
Snippets Groups Projects
Commit beef1b1e authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

bugfix - a race condition

parent 901fa77b
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,8 @@
* significant docs update
* cosmetics
* fixed a bug wherein on very much loaded systems `ConnectionStart` would arrive before
a watch could be registered for it
# v0.99:
......
......@@ -173,14 +173,14 @@ class Connection(object):
sock.settimeout(0)
sock.send(b'AMQP\x00\x00\x09\x01')
self.listener_socket = self.listener_thread.register(sock,
on_read=self.recvf.put,
on_fail=self.on_fail)
self.sendf = SendingFramer(self.listener_socket.send)
self.watch_for_method(0, (ConnectionClose, ConnectionCloseOk),
self.on_connection_close)
Handshaker(self, self.node_definition, self.on_connected, self.extra_properties)
self.listener_socket = self.listener_thread.register(sock,
on_read=self.recvf.put,
on_fail=self.on_fail)
self.sendf = SendingFramer(self.listener_socket.send)
def on_fail(self):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment