Skip to content

Commit

Permalink
transport: remove defer in http2Client.getStream (#2980)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzbarsky authored and dfawley committed Aug 15, 2019
1 parent 24a4d6e commit 0308245
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/transport/http2_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
t.mu.Lock()
defer t.mu.Unlock()
s, ok := t.activeStreams[f.Header().StreamID]
t.mu.Unlock()
return s, ok
}

Expand Down

0 comments on commit 0308245

Please sign in to comment.