diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2024-04-10 21:57:00 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2024-04-10 21:57:00 +0200 |
commit | 976e5e8ae4eb813a06577c2a4a7fb911ea76eaff (patch) | |
tree | bc35e94e4a1acf56ac2827b1ba1e8f7c9da099a4 /src/plugins/relay/api/remote/relay-remote-network.c | |
parent | f40f3cfa40be2d627153df2c1dce924fdbf03104 (diff) | |
download | weechat-976e5e8ae4eb813a06577c2a4a7fb911ea76eaff.zip |
relay/api: free hook_url_handshake when disconnecting from remote
Diffstat (limited to 'src/plugins/relay/api/remote/relay-remote-network.c')
-rw-r--r-- | src/plugins/relay/api/remote/relay-remote-network.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/plugins/relay/api/remote/relay-remote-network.c b/src/plugins/relay/api/remote/relay-remote-network.c index fe6c38c07..2bdc21715 100644 --- a/src/plugins/relay/api/remote/relay-remote-network.c +++ b/src/plugins/relay/api/remote/relay-remote-network.c @@ -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 |