File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -334,9 +334,12 @@ func (l *tcpListener) Addr() net.Addr {
334
334
}
335
335
336
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().
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.
340
343
func (c * Client ) DialContext (ctx context.Context , n , addr string ) (net.Conn , error ) {
341
344
if err := ctx .Err (); err != nil {
342
345
return nil , err
You can’t perform that action at this time.
0 commit comments