Do not set stream state in RST handler. Otherwise, cancel won't be called if a stream gets cancelled.
This commit is contained in:
@ -360,11 +360,6 @@ func (t *http2Server) handleRSTStream(f *http2.RSTStreamFrame) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
s.mu.Lock()
|
|
||||||
// Sets the stream state to avoid sending RSTStreamFrame to client
|
|
||||||
// unnecessarily.
|
|
||||||
s.state = streamDone
|
|
||||||
s.mu.Unlock()
|
|
||||||
t.closeStream(s)
|
t.closeStream(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user