Commit 7247228e authored by louiz’'s avatar louiz’

Connection may be closed from our side too

parent ceec9890
...@@ -123,9 +123,11 @@ void IrcClient::on_connected() ...@@ -123,9 +123,11 @@ void IrcClient::on_connected()
void IrcClient::on_connection_close(const std::string& error_msg) void IrcClient::on_connection_close(const std::string& error_msg)
{ {
std::string message = "Connection closed by remote server."; std::string message = "Connection closed";
if (!error_msg.empty()) if (!error_msg.empty())
message += ": " + error_msg; message += ": " + error_msg;
else
message += ".";
const IrcMessage error{"ERROR", {message}}; const IrcMessage error{"ERROR", {message}};
this->on_error(error); this->on_error(error);
log_warning(message); log_warning(message);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment