Skip to content

Commit 584f08b

Browse files
committed
ssh: CL feedback
1 parent 83552c4 commit 584f08b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

ssh/tcpip.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,12 @@ func (l *tcpListener) Addr() net.Addr {
334334
}
335335

336336
// 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().
337+
//
338+
// The provided Context must be non-nil. If the context expires before the
339+
// 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.
340343
func (c *Client) DialContext(ctx context.Context, n, addr string) (net.Conn, error) {
341344
if err := ctx.Err(); err != nil {
342345
return nil, err

0 commit comments

Comments
 (0)