close amqp connection while checking if broker is up