]> Cypherpunks repositories - gostls13.git/commitdiff
net: clarify DialContext's use of its provided context
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 27 Apr 2016 21:32:37 +0000 (16:32 -0500)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 27 Apr 2016 22:13:57 +0000 (22:13 +0000)
Fixes #15325

Change-Id: I60137ecf27e236e97734b1730ce29ab23e9fe07f
Reviewed-on: https://go-review.googlesource.com/22509
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/dial.go

index 3443161004e92c15c6f94749e9d89ec36114db1e..05d7e98027a938316788bdd09ef286080160a49f 100644 (file)
@@ -284,7 +284,10 @@ func (d *Dialer) Dial(network, address string) (Conn, error) {
 // DialContext connects to the address on the named network using
 // the provided context.
 //
-// The provided Context must be non-nil.
+// The provided Context must be non-nil. If the context expires before
+// the connection is complete, an error is returned. Once successfully
+// connected, any expiration of the context will not affect the
+// connection.
 //
 // See func Dial for a description of the network and address
 // parameters.