We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83552c4 commit 584f08bCopy full SHA for 584f08b
ssh/tcpip.go
@@ -334,9 +334,12 @@ func (l *tcpListener) Addr() net.Addr {
334
}
335
336
// DialContext initiates a connection to the addr from the remote host.
337
-// If the supplied context is cancelled before the connection can be opened,
338
-// ctx.Err() will be returned.
339
-// The resulting connection has a zero LocalAddr() and RemoteAddr().
+//
+// The provided Context must be non-nil. If the context expires before the
+// connection is complete, an error is returned. Once successfully connected,
340
+// any expiration of the context will not affect the connection.
341
342
+// See func Dial for additional information.
343
func (c *Client) DialContext(ctx context.Context, n, addr string) (net.Conn, error) {
344
if err := ctx.Err(); err != nil {
345
return nil, err
0 commit comments