diff --git a/src/connection.hpp b/src/connection.hpp index 512967011..e82af8307 100644 --- a/src/connection.hpp +++ b/src/connection.hpp @@ -87,7 +87,7 @@ class ConnectionListener { * * @param connection The closing connection. */ - virtual void on_close(Connection* connection) = 0; + virtual void on_close(Connection* connection) {}; }; /** diff --git a/src/prepare_host_handler.cpp b/src/prepare_host_handler.cpp index 8a03661c7..8616fe08c 100644 --- a/src/prepare_host_handler.cpp +++ b/src/prepare_host_handler.cpp @@ -69,8 +69,6 @@ void PrepareHostHandler::prepare(uv_loop_t* loop, const ConnectionSettings& sett } void PrepareHostHandler::on_close(Connection* connection) { - callback_(this); - dec_ref(); // The event loop is done with this handler }