]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: use default HTTP/2 frame scheduler
authorDamien Neil <dneil@google.com>
Wed, 5 Jun 2024 16:26:29 +0000 (09:26 -0700)
committerGopher Robot <gobot@golang.org>
Wed, 5 Jun 2024 19:28:07 +0000 (19:28 +0000)
Use the default frame scheduler (currently round-robin)
rather than overriding the default with the priority scheduler.

The priority scheduler is slow, known buggy, and implements
a deprecated stream prioritization mechanism. The default
changed in x/net about a year ago, but we missed that net/http
is overriding that default.

Fixes #67706

Change-Id: I6d76dd0cc8c55eb5dec5cd7d25a5084877e8e8d9
Reviewed-on: https://go-review.googlesource.com/c/go/+/590796
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Auto-Submit: Damien Neil <dneil@google.com>

src/net/http/server.go

index e28b107e9931ebba539f9f101910d96c3c27d0f5..9deb308e8a5954fc1d260af5e99392b71b1476c1 100644 (file)
@@ -3598,9 +3598,7 @@ func (srv *Server) onceSetNextProtoDefaults() {
        // Enable HTTP/2 by default if the user hasn't otherwise
        // configured their TLSNextProto map.
        if srv.TLSNextProto == nil {
-               conf := &http2Server{
-                       NewWriteScheduler: func() http2WriteScheduler { return http2NewPriorityWriteScheduler(nil) },
-               }
+               conf := &http2Server{}
                srv.nextProtoErr = http2ConfigureServer(srv, conf)
        }
 }