I used tcpkill -i eth0 port **** to release the socket on client machine. The TCP connection from client to Rabbitmq server is killed. But inside calling function connection.ioloop.start() happens error. The lowest error tracking level is in def _handle_error(self, error) function of file "base_connection.py" in pika library. It cannot handle NULL value of variable error. So the program crashed unexpectedly.<br><br>I try to intervene the Pika library code by add some exceptions. Now it can handle the NULL exception and my program can create new socket to connect to RabbitMq server.<br><br>Because that solution requires changing library source code, I just want to know another solution without changing library source code to ensure the encapsulation.<br>Any suggestion about writing the rabbitmq connection on client to handle the tcpkill command.<br><br>I really appreciate your answers.<br>&nbsp;<br>