Problem
In the encrypt=strict TLS path in tds.go, getTLSConn replaces outbuf.transport with a *tls.Conn, which bypasses the timeoutConn wrapper. This means the computed preloginTimeout (and even the original ConnTimeout) won't enforce a socket deadline in strict mode. Without a context deadline/cancel, readPrelogin can still hang indefinitely in this path.
Context
Identified during review of PR #360 (which fixed the non-strict prelogin hang). The strict mode path was out of scope for that change.
Suggested Fix
Ensure the TLS strict mode wraps the timeout-aware conn, e.g. pass the timeoutConn itself into tls.Client or otherwise apply read/write deadlines on the underlying net.Conn during prelogin.
Problem
In the
encrypt=strictTLS path intds.go,getTLSConnreplacesoutbuf.transportwith a*tls.Conn, which bypasses thetimeoutConnwrapper. This means the computedpreloginTimeout(and even the originalConnTimeout) won't enforce a socket deadline in strict mode. Without a context deadline/cancel,readPrelogincan still hang indefinitely in this path.Context
Identified during review of PR #360 (which fixed the non-strict prelogin hang). The strict mode path was out of scope for that change.
Suggested Fix
Ensure the TLS strict mode wraps the timeout-aware conn, e.g. pass the
timeoutConnitself intotls.Clientor otherwise apply read/write deadlines on the underlyingnet.Connduring prelogin.