diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 3de432ad5..18cccb5af 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -19,6 +19,7 @@ Bug fixes:: * core: fix memory leak when config version is invalid or not supported * core: fix crash when "config_version" is present in a configuration file without a value * core: display an error on startup if environment variable "HOME" is not set + * relay: close properly connection with the IRC client in case of server disconnection (issue #2038) * ruby: fix use of NULL variable when displaying exception [[v4.1.1]] diff --git a/src/plugins/relay/irc/relay-irc.c b/src/plugins/relay/irc/relay-irc.c index eaf37f407..96d1e3be2 100644 --- a/src/plugins/relay/irc/relay-irc.c +++ b/src/plugins/relay/irc/relay-irc.c @@ -616,6 +616,13 @@ relay_irc_signal_irc_disc_cb (const void *pointer, void *data, if (strcmp ((char *)signal_data, client->protocol_args) == 0) { + relay_irc_sendf (client, + ":%s ERROR :WeeChat: disconnected from server \"%s\"", + RELAY_IRC_DATA(client, address), + client->protocol_args); + relay_irc_sendf (client, + ":%s ERROR :Closing Link", + RELAY_IRC_DATA(client, address)); relay_client_set_status (client, RELAY_STATUS_DISCONNECTED); }