1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

relay/api: free hook_url_handshake when disconnecting from remote

This commit is contained in:
Sébastien Helleu
2024-04-10 21:57:00 +02:00
parent f40f3cfa40
commit 976e5e8ae4
@@ -81,16 +81,22 @@ relay_remote_network_close_connection (struct t_relay_remote *remote)
{
if (!remote)
return;
if (remote->hook_fd)
if (remote->hook_url_handshake)
{
weechat_unhook (remote->hook_fd);
remote->hook_fd = NULL;
weechat_unhook (remote->hook_url_handshake);
remote->hook_url_handshake = NULL;
}
if (remote->hook_connect)
{
weechat_unhook (remote->hook_connect);
remote->hook_connect = NULL;
}
if (remote->hook_fd)
{
weechat_unhook (remote->hook_fd);
remote->hook_fd = NULL;
}
if (remote->sock != -1)
{
#ifdef _WIN32