mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 05:46:38 +02:00
9aaea09b02
When there are multiple addresses for a server and a TLS handshake failure occurs, the next server in the list will connect and then timeout without performing any TLS handshake. This is because irc_server_close_connection closes server->sock so the next pipe to be created reuses that fd, but the hook for the handshake fd still exists when the next connection attempt is started. The hook for network_connect_child_read_cb is never added because a hook for the reused fd number still exists. Resolve this by removing the handshake hook before calling the connect callback.