diff options
author | Jenkins <jenkins@review.openstack.org> | 2013-01-15 18:05:56 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-01-15 18:05:56 +0000 |
commit | 4d38326ef45b0b5301794e00e5fd4c788ccc7fc6 (patch) | |
tree | df1a553a63a29539391d19f92259f511c5b3a838 /openstack/common/rpc/impl_zmq.py | |
parent | a12c97e21ab7031abff545fb245b8f3eb1ff50c4 (diff) | |
parent | f1b23c8077593334ec8bc94fcb40287b7d31f7a5 (diff) | |
download | oslo-4d38326ef45b0b5301794e00e5fd4c788ccc7fc6.tar.gz oslo-4d38326ef45b0b5301794e00e5fd4c788ccc7fc6.tar.xz oslo-4d38326ef45b0b5301794e00e5fd4c788ccc7fc6.zip |
Merge "Fix zmq socket.close() with eventlet 0.9.17"
Diffstat (limited to 'openstack/common/rpc/impl_zmq.py')
-rw-r--r-- | openstack/common/rpc/impl_zmq.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/openstack/common/rpc/impl_zmq.py b/openstack/common/rpc/impl_zmq.py index d2af079..3a88f9f 100644 --- a/openstack/common/rpc/impl_zmq.py +++ b/openstack/common/rpc/impl_zmq.py @@ -187,11 +187,15 @@ class ZmqSocket(object): pass self.subscriptions = [] - # Linger -1 prevents lost/dropped messages try: - self.sock.close(linger=-1) + # Default is to linger + self.sock.close() except Exception: - pass + # While this is a bad thing to happen, + # it would be much worse if some of the code calling this + # were to fail. For now, lets log, and later evaluate + # if we can safely raise here. + LOG.error("ZeroMQ socket could not be closed.") self.sock = None def recv(self): |