From fc103b042102dc621a8795aad2dc80bc8e4e5b3b Mon Sep 17 00:00:00 2001 From: iamqizhao Date: Fri, 8 May 2015 12:24:46 -0700 Subject: [PATCH] Do not set stream state in RST handler. Otherwise, cancel won't be called if a stream gets cancelled. --- transport/http2_server.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/transport/http2_server.go b/transport/http2_server.go index e2c6e497..ef1a872e 100644 --- a/transport/http2_server.go +++ b/transport/http2_server.go @@ -360,11 +360,6 @@ func (t *http2Server) handleRSTStream(f *http2.RSTStreamFrame) { if !ok { return } - s.mu.Lock() - // Sets the stream state to avoid sending RSTStreamFrame to client - // unnecessarily. - s.state = streamDone - s.mu.Unlock() t.closeStream(s) }