summaryrefslogtreecommitdiffstats
path: root/openstack
diff options
context:
space:
mode:
authorDavid Ripton <dripton@redhat.com>2013-05-31 18:47:31 -0400
committerDavid Ripton <dripton@redhat.com>2013-05-31 18:47:31 -0400
commit15d8d698b7c67c43dc7a2b0c2c6952734bd2ba66 (patch)
tree24263090c0a234b60087ca5e680e257906d5f53b /openstack
parentbabe5fd2f3cb5b3fb08597d537e9a44aa39609bd (diff)
downloadoslo-15d8d698b7c67c43dc7a2b0c2c6952734bd2ba66.tar.gz
oslo-15d8d698b7c67c43dc7a2b0c2c6952734bd2ba66.tar.xz
oslo-15d8d698b7c67c43dc7a2b0c2c6952734bd2ba66.zip
Silence exceptions from qpid connection.close()
Fixes bug 1185465 Don't log exceptions that happen during connection.close(). They're not surprising (a closed socket can't be read or written), don't require sysadmin attention, and provide red herrings in the logs to distract from finding real root causes of problems. Change-Id: Ie414ba3f4ff1f1dee13e6168ac2e28dab535581b
Diffstat (limited to 'openstack')
-rw-r--r--openstack/common/rpc/impl_qpid.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/openstack/common/rpc/impl_qpid.py b/openstack/common/rpc/impl_qpid.py
index a03ebb2..e7ac016 100644
--- a/openstack/common/rpc/impl_qpid.py
+++ b/openstack/common/rpc/impl_qpid.py
@@ -384,7 +384,13 @@ class Connection(object):
"""Close/release this connection"""
self.cancel_consumer_thread()
self.wait_on_proxy_callbacks()
- self.connection.close()
+ try:
+ self.connection.close()
+ except Exception:
+ # NOTE(dripton) Logging exceptions that happen during cleanup just
+ # causes confusion; there's really nothing useful we can do with
+ # them.
+ pass
self.connection = None
def reset(self):