diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2012-03-23 18:24:47 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2012-03-23 18:24:47 +0100 |
commit | 9972cce777852c59c4ba3226d52cec83565b1dd9 (patch) | |
tree | ca8e8e67885269a9610fe2eb7d8b508b33a6cfea /src/plugins/irc | |
parent | 4474f9ca0e7d0eca0edfeae6310594b2436a1b03 (diff) | |
download | weechat-9972cce777852c59c4ba3226d52cec83565b1dd9.zip |
core: add a connection timeout for child process in hook_connect (bug #35966)
Diffstat (limited to 'src/plugins/irc')
-rw-r--r-- | src/plugins/irc/irc-server.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index ac523fe8a..19aca324d 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -3022,6 +3022,20 @@ irc_server_connect_cb (void *data, int status, int gnutls_rc, irc_server_close_connection (server); irc_server_reconnect_schedule (server); break; + case WEECHAT_HOOK_CONNECT_TIMEOUT: + weechat_printf (server->buffer, + _("%s%s: timeout"), + weechat_prefix ("error"), IRC_PLUGIN_NAME); + if (error && error[0]) + { + weechat_printf (server->buffer, + _("%s%s: error: %s"), + weechat_prefix ("error"), IRC_PLUGIN_NAME, + error); + } + irc_server_close_connection (server); + irc_server_reconnect_schedule (server); + break; } return WEECHAT_RC_OK; |