diff --git a/example_client_test.go b/example_client_test.go index 2c8d6d7..d285a34 100644 --- a/example_client_test.go +++ b/example_client_test.go @@ -204,6 +204,9 @@ func (client *Client) handleReInit(conn *amqp.Connection) bool { select { case <-client.done: return true + case <-client.notifyConnClose: + client.logger.Println("Connection closed. Reconnecting...") + return false case <-time.After(reInitDelay): } continue