You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful for ServerConn to provide a NewServerConnContext method next to NewServerConn.
We have to pass net.Conn to NewServerConn so we can already control deadlines and such externally but I think many of our users just use NewServerConn without thinking about it can hang forever.
// NewServerConnContext is like [NewServerConn] but also accepts a context. The
// provided Context must be non-nil. If the context expires before the handshake
// is complete, an error is returned. Once the handshake is completed, any
// expiration of the context will not affect the connection.
func NewServerConnContext(ctx context.Context, c net.Conn, config *ServerConfig) (*ServerConn, <-chan NewChannel, <-chan *Request, error)
The text was updated successfully, but these errors were encountered:
Proposal Details
It would be useful for
ServerConn
to provide aNewServerConnContext
method next toNewServerConn
.We have to pass
net.Conn
toNewServerConn
so we can already control deadlines and such externally but I think many of our users just useNewServerConn
without thinking about it can hang forever.The text was updated successfully, but these errors were encountered: