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)
|
delete(t.activeStreams, s.id)
|
||||||
if t.state == draining && len(t.activeStreams) == 0 {
|
if t.state == draining && len(t.activeStreams) == 0 {
|
||||||
// The transport is draining and s is the last live stream on t.
|
// The transport is draining and s is the last live stream on t.
|
||||||
t.mu.Unlock()
|
defer t.Close()
|
||||||
t.Close()
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
t.mu.Unlock()
|
t.mu.Unlock()
|
||||||
if updateStreams {
|
if updateStreams {
|
||||||
|
Reference in New Issue
Block a user