in lib/HandlerBase.cc [151:182]
void HandlerBase::handleDisconnection(Result result, const ClientConnectionPtr& cnx) {
State state = state_;
ClientConnectionPtr currentConnection = getCnx().lock();
if (currentConnection && cnx.get() != currentConnection.get()) {
LOG_WARN(
getName() << "Ignoring connection closed since we are already attached to a newer connection");
return;
}
resetCnx();
if (isResultRetryable(result)) {
scheduleReconnection();
return;
}
switch (state) {
case Pending:
case Ready:
scheduleReconnection();
break;
case NotStarted:
case Closing:
case Closed:
case Producer_Fenced:
case Failed:
LOG_DEBUG(getName() << "Ignoring connection closed event since the handler is not used anymore");
break;
}
}