diff --git a/CHANGELOG.md b/CHANGELOG.md index b805cfa5cc82f1a00802b8ebd1c8fde0bfd65857..117fca25c3579d4c1e6249f3230cc33dcfdd6fdd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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: diff --git a/coolamqp/uplink/connection/connection.py b/coolamqp/uplink/connection/connection.py index e658836d0caef6fc9f8ec17b2bad4b9a450ab595..cf99595d486685761c3b375bd7d901797edc505a 100644 --- a/coolamqp/uplink/connection/connection.py +++ b/coolamqp/uplink/connection/connection.py @@ -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): """