From f66510706b82dcb191fc6336a665089ecaa2526d Mon Sep 17 00:00:00 2001 From: Pavel Rybintsev Date: Thu, 1 Oct 2026 22:14:14 -0500 Subject: [PATCH] make tls handshake respect context cancelation --- initiator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/initiator.go b/initiator.go index 9af90cb2b..51ddff5be 100644 --- a/initiator.go +++ b/initiator.go @@ -198,7 +198,7 @@ func (i *Initiator) handleConnection(session *session, tlsConfig *tls.Config, di tlsConfig.ServerName = serverName } tlsConn := tls.Client(netConn, tlsConfig) - if err = tlsConn.Handshake(); err != nil { + if err = tlsConn.HandshakeContext(ctx); err != nil { session.log.OnEventf("Failed handshake: %v", err) goto reconnect }