From 90606f8cb286ff252046eef15396b81e7ba37195 Mon Sep 17 00:00:00 2001 From: Hengqing Hu Date: Fri, 28 Dec 2012 18:33:46 +0800 Subject: Close kombu.connection.BrokerConnection correctly Make kombu.connection.BrokerConnection use release() to close the connection. It has no such attribute as close(), since AttributeError is in connection_errors, the fault was previous concealed by the following catch statement. Change-Id: I9f7da2c64f9d408aa2a9ddf723ea83291887cff6 --- openstack/common/rpc/impl_kombu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openstack') diff --git a/openstack/common/rpc/impl_kombu.py b/openstack/common/rpc/impl_kombu.py index ced4e96..5bc7a6a 100644 --- a/openstack/common/rpc/impl_kombu.py +++ b/openstack/common/rpc/impl_kombu.py @@ -469,7 +469,7 @@ class Connection(object): LOG.info(_("Reconnecting to AMQP server on " "%(hostname)s:%(port)d") % params) try: - self.connection.close() + self.connection.release() except self.connection_errors: pass # Setting this in case the next statement fails, though -- cgit