1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-22 19:06:37 +02:00

Fix for unclosed/leaking sockets from issue #358

This commit is contained in:
Rob Campbell
2016-09-19 02:20:52 -07:00
parent 58ce36c2c9
commit cb382a0174
+3 -2
View File
@@ -3504,12 +3504,13 @@ irc_server_connect_cb (const void *pointer, void *data,
proxy = IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_PROXY);
server->hook_connect = NULL;
/* set socket */
server->sock = sock;
switch (status)
{
case WEECHAT_HOOK_CONNECT_OK:
/* set socket and IP */
server->sock = sock;
/* set IP */
if (server->current_ip)
free (server->current_ip);
server->current_ip = (ip_address) ? strdup (ip_address) : NULL;