diff --git a/coolamqp/clustering/cluster.py b/coolamqp/clustering/cluster.py index 19fea7b3668b450118a784dc901f955bed2b5b35..63cc8ffd88632ed48c36e7247ec6b8ab9e045756 100644 --- a/coolamqp/clustering/cluster.py +++ b/coolamqp/clustering/cluster.py @@ -145,6 +145,7 @@ class Cluster(object): Terminate all connections, release resources - finish the job. :param wait: block until this is done """ + logger.info('Commencing shutdown') self.snr.shutdown() self.listener.terminate() diff --git a/coolamqp/uplink/connection/connection.py b/coolamqp/uplink/connection/connection.py index 1c29356dd70cd45e8c79b38eda5e7a779a7645f4..7fac7c25b71f146ff0d0127767ea62bdab31d925 100644 --- a/coolamqp/uplink/connection/connection.py +++ b/coolamqp/uplink/connection/connection.py @@ -249,7 +249,10 @@ class Connection(object): be called, and everything will process according to ListenerThread's on_fail callback. """ - self.listener_socket.oneshot(delay, callback) + try: + self.listener_socket.oneshot(delay, callback) + except AttributeError: + print(dir(self)) def unwatch_all(self, channel_id): """ diff --git a/coolamqp/uplink/handshake.py b/coolamqp/uplink/handshake.py index 083dcfe4fc44f983bb1bd731a5c0b3718be3d541..25711809529427d7b9695c918b12ea91dacc44b2 100644 --- a/coolamqp/uplink/handshake.py +++ b/coolamqp/uplink/handshake.py @@ -22,7 +22,7 @@ CLIENT_DATA = [ # because RabbitMQ is some kind of a fascist and does not allow # these fields to be of type short-string (b'product', (b'CoolAMQP', 'S')), - (b'version', (b'develop', 'S')), + (b'version', (b'0.81', 'S')), (b'copyright', (b'Copyright (C) 2016-2017 DMS Serwis', 'S')), (b'information', (b'Licensed under the MIT License.\nSee https://github.com/smok-serwis/coolamqp for details', 'S')), (b'capabilities', ([(capa, (True, 't')) for capa in SUPPORTED_EXTENSIONS], 'F')), diff --git a/coolamqp/uplink/listener/epoll_listener.py b/coolamqp/uplink/listener/epoll_listener.py index a27095e0e1cbc46535385b1970afd9e1c29c5f58..b5d3e1cf37d06d28f2887318c6e804af642ce5ef 100644 --- a/coolamqp/uplink/listener/epoll_listener.py +++ b/coolamqp/uplink/listener/epoll_listener.py @@ -112,12 +112,13 @@ class EpollListener(object): This object is unusable after this call. """ + self.time_events = [] for sock in six.itervalues(self.fd_to_sock): sock.on_fail() sock.close() + self.fd_to_sock = {} self.epoll.close() - self.time_events = [] def oneshot(self, sock, delta, callback): """ diff --git a/setup.py b/setup.py index 0fd9dccc89d1e788ae40cd83d6fe044d15db37ed..49dda78339bd335eef1ae478afe7e2472cc9f24f 100644 --- a/setup.py +++ b/setup.py @@ -4,12 +4,12 @@ from setuptools import setup setup(name=u'CoolAMQP', - version='0.80', + version='0.81', description=u'The fastest AMQP client', author=u'DMS Serwis s.c.', author_email=u'piotrm@smok.co', url=u'https://github.com/smok-serwis/coolamqp', - download_url='https://github.com/smok-serwis/coolamqp/archive/v0.80.zip', + download_url='https://github.com/smok-serwis/coolamqp/archive/v0.81.zip', keywords=['amqp', 'rabbitmq', 'client', 'network', 'ha', 'high availability'], packages=[ 'coolamqp',