diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2014-01-31 19:24:26 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2014-01-31 19:24:26 +0100 |
commit | 219f75b225a011354cc4651376e74a327a1a732f (patch) | |
tree | 11dd4856711a9ca7832baadb951374ff9cd5147e /src/plugins | |
parent | 59481611dd5b8918cc7fe1e7dc05837d1e4ae93b (diff) | |
download | weechat-219f75b225a011354cc4651376e74a327a1a732f.zip |
irc: clear the gnutls session in all cases after SSL connection error
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/irc/irc-server.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index d7b391401..3c42400f2 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -3004,12 +3004,11 @@ irc_server_close_connection (struct t_irc_server *server) { #ifdef HAVE_GNUTLS /* close SSL connection */ - if ((server->sock != -1) && (server->ssl_connected)) + if (server->ssl_connected) { - if (server->ssl_connected) + if (server->sock != -1) gnutls_bye (server->gnutls_sess, GNUTLS_SHUT_WR); - if (server->ssl_connected) - gnutls_deinit (server->gnutls_sess); + gnutls_deinit (server->gnutls_sess); } #endif } |