From 15d8d698b7c67c43dc7a2b0c2c6952734bd2ba66 Mon Sep 17 00:00:00 2001 From: David Ripton Date: Fri, 31 May 2013 18:47:31 -0400 Subject: 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 --- openstack/common/rpc/impl_qpid.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'openstack') 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): -- cgit