Commit e776975a authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

net/http: update bundled http2 for Server WriteTimeout change

Updates http2 to x/net/http2 git rev 8fd7f25 for:

    http2: clear WriteTimeout in Server
    https://golang.org/cl/34724

And un-skip the new test. (The new test is a slow test, anyway, so
won't affect builders or all.bash, but I verified it now passes.)

Updates #18437

Change-Id: Ia91ae702edfd23747a9d6b61da284a5a957bfed3
Reviewed-on: https://go-review.googlesource.com/34729
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: 's avatarJoe Tsai <thebrokentoaster@gmail.com>
Reviewed-by: 's avatarKale B <kale@lemnisys.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent b63ca1e9
...@@ -3141,6 +3141,10 @@ func (s *http2Server) ServeConn(c net.Conn, opts *http2ServeConnOpts) { ...@@ -3141,6 +3141,10 @@ func (s *http2Server) ServeConn(c net.Conn, opts *http2ServeConnOpts) {
pushEnabled: true, pushEnabled: true,
} }
if sc.hs.WriteTimeout != 0 {
sc.conn.SetWriteDeadline(time.Time{})
}
if s.NewWriteScheduler != nil { if s.NewWriteScheduler != nil {
sc.writeSched = s.NewWriteScheduler() sc.writeSched = s.NewWriteScheduler()
} else { } else {
......
...@@ -537,7 +537,6 @@ func TestServerTimeouts(t *testing.T) { ...@@ -537,7 +537,6 @@ func TestServerTimeouts(t *testing.T) {
// Test that the HTTP/2 server handles Server.WriteTimeout (Issue 18437) // Test that the HTTP/2 server handles Server.WriteTimeout (Issue 18437)
func TestHTTP2WriteDeadlineExtendedOnNewRequest(t *testing.T) { func TestHTTP2WriteDeadlineExtendedOnNewRequest(t *testing.T) {
t.Skip("disabled until Issue 18437 is fixed")
if testing.Short() { if testing.Short() {
t.Skip("skipping in short mode") t.Skip("skipping in short mode")
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment