]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: document that Hijack's net.Conn might have left-over timeouts set
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 24 Jun 2015 10:11:58 +0000 (12:11 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 25 Jun 2015 03:01:52 +0000 (03:01 +0000)
Fixes #8296

Change-Id: I71b330a0f961d46ae4ed81d5f3f5ce5bf708a29a
Reviewed-on: https://go-review.googlesource.com/11411
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/net/http/server.go

index 008666204d20e995442609c72730f9109ea96d2f..e17dacc5597323aa7fe8a0b0ed5471b4a40a435e 100644 (file)
@@ -97,8 +97,14 @@ type Hijacker interface {
        // Hijack lets the caller take over the connection.
        // After a call to Hijack(), the HTTP server library
        // will not do anything else with the connection.
+       //
        // It becomes the caller's responsibility to manage
        // and close the connection.
+       //
+       // The returned net.Conn may have read or write deadlines
+       // already set, depending on the configuration of the
+       // Server. It is the caller's responsibility to set
+       // or clear those deadlines as needed.
        Hijack() (net.Conn, *bufio.ReadWriter, error)
 }