From 7247228e9785fd7c8d796d4aa0eb3b9c6fc8f221 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 22 Sep 2015 03:50:08 +0200 Subject: Connection may be closed from our side too --- src/irc/irc_client.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/irc') diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp index 26f9a46..b4df7dd 100644 --- a/src/irc/irc_client.cpp +++ b/src/irc/irc_client.cpp @@ -123,9 +123,11 @@ void IrcClient::on_connected() 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()) message += ": " + error_msg; + else + message += "."; const IrcMessage error{"ERROR", {message}}; this->on_error(error); log_warning(message); -- cgit v1.2.3