Added checking of pika.exceptions.ConnectionClosed exception.