This commit is contained in:
Timur A. Fatkhullin
2024-11-09 23:51:40 +03:00
parent afd1a917b4
commit afa8d09ade
5 changed files with 22 additions and 14 deletions

View File

@@ -353,13 +353,16 @@ protected:
_isListening<SessionT>[this][id] = true;
doAccept<SessionT>(acceptor, std::move(id), std::move(sess_ctx));
} else {
errorMessage(SessionT::netservice_t::formatError(ec));
std::string str{"Cannot start accepting connection: "};
SessionT::netservice_t::formatError(ec, str);
errorMessage(str);
_isListening<SessionT>[this][id] = false;
}
});
}
virtual void errorMessage(const std::string&) = 0;
virtual void errorMessage(const std::string&) {};
};