transport: remove defer in http2Client.getStream (#2980)
This commit is contained in:

committed by
Doug Fawley

parent
24a4d6eb88
commit
030824531b
@ -855,8 +855,8 @@ func (t *http2Client) Write(s *Stream, hdr []byte, data []byte, opts *Options) e
|
|||||||
|
|
||||||
func (t *http2Client) getStream(f http2.Frame) (*Stream, bool) {
|
func (t *http2Client) getStream(f http2.Frame) (*Stream, bool) {
|
||||||
t.mu.Lock()
|
t.mu.Lock()
|
||||||
defer t.mu.Unlock()
|
|
||||||
s, ok := t.activeStreams[f.Header().StreamID]
|
s, ok := t.activeStreams[f.Header().StreamID]
|
||||||
|
t.mu.Unlock()
|
||||||
return s, ok
|
return s, ok
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user