mirror of
https://github.com/netbirdio/netbird.git
synced 2026-08-25 00:51:28 +02:00
DialContext limited only the TCP establishment, so a peer that accepted the connection and then stayed silent left gossh.NewClientConn blocking forever and the terminal stuck on "Connecting". Set the socket deadline from the dial context before the handshake and clear it on success, so the handshake shares the dial timeout instead of being able to hang. Verified against a silent listener: the connect now returns i/o timeout instead of blocking.