Tune some clean up code
This commit is contained in:
@ -418,9 +418,7 @@ func (t *http2Client) CloseStream(s *Stream, err error) {
|
||||
delete(t.activeStreams, s.id)
|
||||
if t.state == draining && len(t.activeStreams) == 0 {
|
||||
// The transport is draining and s is the last live stream on t.
|
||||
t.mu.Unlock()
|
||||
t.Close()
|
||||
return
|
||||
defer t.Close()
|
||||
}
|
||||
t.mu.Unlock()
|
||||
if updateStreams {
|
||||
|
Reference in New Issue
Block a user