diff --git a/conn.go b/conn.go index 7bfac68..d75b48d 100644 --- a/conn.go +++ b/conn.go @@ -1672,6 +1672,12 @@ func (c *Conn) handshakeContext(ctx context.Context) (ret error) { } // ConnectionState returns basic TLS details about the connection. +// +// The returned [ConnectionState] is only meaningful after the handshake has +// completed, as reported by [ConnectionState.HandshakeComplete]; before then +// its fields are not populated. The handshake is run automatically by the +// first [Conn.Read] or [Conn.Write], or it can be triggered explicitly with +// [Conn.Handshake]. func (c *Conn) ConnectionState() ConnectionState { c.handshakeMutex.Lock() defer c.handshakeMutex.Unlock()