diff --git a/kombu/tests/test_connection.py b/kombu/tests/test_connection.py index 78242ab2..0580d17c 100644 --- a/kombu/tests/test_connection.py +++ b/kombu/tests/test_connection.py @@ -128,6 +128,7 @@ class test_connection_utils(TestCase): virtual_host="/") def test_url_IPV6(self): + C = BrokerConnection raise SkipTest("urllib can't parse ipv6 urls") self.assert_info( diff --git a/kombu/transport/amqplib.py b/kombu/transport/amqplib.py index ec2f1ca9..a59544b3 100644 --- a/kombu/transport/amqplib.py +++ b/kombu/transport/amqplib.py @@ -35,6 +35,19 @@ DEFAULT_PORT = 5672 transport.AMQP_PROTOCOL_HEADER = str_to_bytes("AMQP\x01\x01\x08\x00") +# - fixes warning when socket is not connected. +_del = transport._AbstractTransport.__del__ +for cls in transport.TCPTransport, transport.SSLTransport: + class _Transport(cls): + + def __del__(self): + try: + _del(self) + except socket.error: + pass + setattr(transport, cls.__name__, _Transport) + + class Connection(amqp.Connection): # pragma: no cover def _do_close(self, *args, **kwargs):