Skip to content

Commit

Permalink
Switched local var to deepcopy
Browse files Browse the repository at this point in the history
  • Loading branch information
zasweq committed Sep 13, 2022
1 parent 98cddf6 commit 9bd4117
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/transport/http2_client.go
Expand Up @@ -1233,7 +1233,11 @@ func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) {
upperLimit = math.MaxUint32 // Kill all streams after the GoAway ID.
}

activeStreams := t.activeStreams
activeStreams := make(map[uint32]*Stream)
for streamID, stream := range t.activeStreams {
activeStreams[streamID] = stream
}

t.prevGoAwayID = id
t.mu.Unlock()
for streamID, stream := range activeStreams {
Expand Down

0 comments on commit 9bd4117

Please sign in to comment.