diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/plugins/irc/irc-server.c | 6 |
2 files changed, 7 insertions, 0 deletions
@@ -14,6 +14,7 @@ Version 0.3.9 (under dev!) * core: escape special chars (`#[\`) in configuration files for name of options (bug #36584) * guile: fix path of guile include dirs in cmake build (patch #7790) +* irc: fix freeze when reading on socket with SSL enabled (bug #35097) * irc: reallow names beginning with "#" for servers Version 0.3.8 (2012-06-03) diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index 537199ca8..1df8f9fb9 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -25,6 +25,7 @@ #include <stdlib.h> #include <stddef.h> #include <unistd.h> +#include <fcntl.h> #include <errno.h> #include <stdio.h> #include <stdarg.h> @@ -2874,6 +2875,7 @@ irc_server_connect_cb (void *data, int status, int gnutls_rc, { struct t_irc_server *server; const char *proxy; + int flags; server = (struct t_irc_server *)data; @@ -2888,6 +2890,10 @@ irc_server_connect_cb (void *data, int status, int gnutls_rc, if (server->current_ip) free (server->current_ip); server->current_ip = (ip_address) ? strdup (ip_address) : NULL; + flags = fcntl (server->sock, F_GETFL); + if (flags == -1) + flags = 0; + fcntl (server->sock, F_SETFL, flags | O_NONBLOCK); weechat_printf (server->buffer, _("%s: connected to %s/%d (%s)"), IRC_PLUGIN_NAME, |