https://github.com/golang/go/issues/49741
x/net/http2: http.Server.WriteTimeout does not fire if the http2 stream's window is out of space. #49741 The 1.17 back port issue: x/net/http2: http.Server.WriteTimeout does not fire if the http2 stream's window is out of space. [1.17 backport] #49921 Loaded go1.17.6 on Mac and Linux machines. Saw the release notes say issue #49741 is cherry-picked as #49921. Looked at the issue and found a very concise hanging example and expected the example would no longer hang. But it hangs on both Mac and Linux. I admit to being confused by how the x/net/http2 source is being vendored. I did not find the source files in the go1.17.6 source tree created from the go1.17.6.tar.gz download. Here's the example @davecheney provided: ```go package main import ( "io" "log" "net/http" "net/http/httptest" "strings" "time" ) func handler(w http.ResponseWriter, r *http.Request) { data := strings.Repeat("x", 1<<16) tick := time.NewTicker(1 * time.Millisecond) defer tick.Stop() for { select { case <-tick.C: n, err := io.WriteString(w, data) log.Printf("wrote %d, err %v", n, err) if err != nil { return } case <-r.Context().Done(): log.Printf("context cancelled") return } } } func main() { sv := httptest.NewUnstartedServer(http.HandlerFunc(handler)) sv.EnableHTTP2 = true sv.Config.WriteTimeout = 1 * time.Second sv.StartTLS() resp, err := sv.Client().Get(sv.URL + "/") if err != nil { log.Fatal(err) } defer resp.Body.Close() select {} // block forever } ``` -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/5b003909-cdd6-4ede-a0ae-a990a5403716n%40googlegroups.com.