mirror of
https://github.com/golang/go
synced 2024-11-23 00:20:12 -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:
parent
6897030fe3
commit
8f36668178
@ -2920,7 +2920,10 @@ func (srv *Server) onceSetNextProtoDefaults() {
|
|||||||
// Enable HTTP/2 by default if the user hasn't otherwise
|
// Enable HTTP/2 by default if the user hasn't otherwise
|
||||||
// configured their TLSNextProto map.
|
// configured their TLSNextProto map.
|
||||||
if srv.TLSNextProto == nil {
|
if srv.TLSNextProto == nil {
|
||||||
srv.nextProtoErr = http2ConfigureServer(srv, nil)
|
conf := &http2Server{
|
||||||
|
NewWriteScheduler: func() http2WriteScheduler { return http2NewPriorityWriteScheduler(nil) },
|
||||||
|
}
|
||||||
|
srv.nextProtoErr = http2ConfigureServer(srv, conf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user