Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/connection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class ConnectionListener {
*
* @param connection The closing connection.
*/
virtual void on_close(Connection* connection) = 0;
virtual void on_close(Connection* connection) {};
};

/**
Expand Down
2 changes: 0 additions & 2 deletions src/prepare_host_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ void PrepareHostHandler::prepare(uv_loop_t* loop, const ConnectionSettings& sett
}

void PrepareHostHandler::on_close(Connection* connection) {
callback_(this);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Long-term the better answer is probably to not make HOST_UP/HOST_READY/HOST_ADD event distribution a function of the callback in use here. Those ops should be handled by logic in the relevant functions of cluster.cpp, specifically as some kind of "after" action from the prepare op. But this fix allows us to address the immediate problem without having to refactor the entirety of message delivery.


dec_ref(); // The event loop is done with this handler
}

Expand Down