ebin123456 / py-amqplib

Automatically exported from code.google.com/p/py-amqplib
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Exception AttributeError: "'NoneType' object has no attribute 'SHUT_RDWR'" #56

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Which version of amqplib are you using?
amqplib==1.0.2

Have you checked to see if there is a newer version in the "Featured
Downloads" section of the front page of this project?
no

Which version of Python?
2.7.8

In my logs I see some occurences of:
Exception AttributeError: "'NoneType' object has no attribute 'SHUT_RDWR'" in 
<bound method TCPTransport.__del__ of 
<amqplib.client_0_8.transport.TCPTransport object at 0x7feff33a2dd0>> ignored

I guess that is because
    def close(self):
        if self.sock is not None:
            self._shutdown_transport()
            # Call shutdown first to make sure that pending messages
            # reach the AMQP broker if the program exits after
            # calling this method.
            self.sock.shutdown(socket.SHUT_RDWR)
in a situation where Python is shutting down and the socket module already is 
empty ... or something like that. 

This is not a big deal for me - I just wanted to let you know and share the 
possible hint of what the root cause is.

Original issue reported on code.google.com by kiile...@gmail.com on 19 Apr 2015 at 4:41