Commit 90d536f3 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

net/http: update bundled http2 for write scheduling order fix

Updates x/net/http2 to x/net git rev 00ed5e9 for:

    http2: schedule RSTStream writes onto its stream's queue
    https://golang.org/cl/33238

Fixes #17243

Change-Id: I79cc5d15bf69ead28d549d4f798c12f4ee2a2201
Reviewed-on: https://go-review.googlesource.com/33241Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 24a088d2
......@@ -7681,6 +7681,10 @@ type http2FrameWriteRequest struct {
// 0 is used for non-stream frames such as PING and SETTINGS.
func (wr http2FrameWriteRequest) StreamID() uint32 {
if wr.stream == nil {
if se, ok := wr.write.(http2StreamError); ok {
return se.StreamID
}
return 0
}
return wr.stream.id
......@@ -7754,17 +7758,13 @@ func (wr http2FrameWriteRequest) Consume(n int32) (http2FrameWriteRequest, http2
// String is for debugging only.
func (wr http2FrameWriteRequest) String() string {
var streamID uint32
if wr.stream != nil {
streamID = wr.stream.id
}
var des string
if s, ok := wr.write.(fmt.Stringer); ok {
des = s.String()
} else {
des = fmt.Sprintf("%T", wr.write)
}
return fmt.Sprintf("[FrameWriteRequest stream=%d, ch=%v, writer=%v]", streamID, wr.done != nil, des)
return fmt.Sprintf("[FrameWriteRequest stream=%d, ch=%v, writer=%v]", wr.StreamID(), wr.done != nil, des)
}
// writeQueue is used by implementations of WriteScheduler.
......
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