Fix issue with AttributeError raised when socket connection closed
Fix issue with AttributeError raised when socket connection closed

jstnlef/pika,vitaly-krugl/pika,skftn/pika,reddec/pika,fkarb/pika-python3,Zephor5/pika,benjamin9999/pika,renshawbay/pika-python3,shinji-s/pika,vrtsystems/pika,Tarsbot/pika,zixiliuyue/pika,hugoxia/pika,knowsis/pika,pika/pika