1
0
mirror of https://github.com/golang/go synced 2024-11-22 21:40:03 -07:00

net/http: for http2, use the priority write scheduler by default

Updates #18318

Change-Id: Ibd4ebc7708abf87eded8da9661378b5777b8a400
Reviewed-on: https://go-review.googlesource.com/43231
Run-TryBot: Tom Bergan <tombergan@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Tom Bergan 2017-05-11 10:13:10 -07:00
parent 6897030fe3
commit 8f36668178

View File

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