diff --git a/include/connection.h b/include/connection.h index 10d8571..f01b21b 100644 --- a/include/connection.h +++ b/include/connection.h @@ -216,6 +216,10 @@ class Connection : private ::AMQP::ConnectionHandler */ void onClosed(::AMQP::Connection *connection) override { + // no longer need the socket or the input + _socket.reset(); + _input.reset(); + // send to the handler if (_handler) _handler->onClosed(this); }