Skip to content

Commit 9bd4117

Browse files
committed
Switched local var to deepcopy
1 parent 98cddf6 commit 9bd4117

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎internal/transport/http2_client.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,11 @@ func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) {
12331233
upperLimit = math.MaxUint32 // Kill all streams after the GoAway ID.
12341234
}
12351235

1236-
activeStreams := t.activeStreams
1236+
activeStreams := make(map[uint32]*Stream)
1237+
for streamID, stream := range t.activeStreams {
1238+
activeStreams[streamID] = stream
1239+
}
1240+
12371241
t.prevGoAwayID = id
12381242
t.mu.Unlock()
12391243
for streamID, stream := range activeStreams {

0 commit comments

Comments
 (0)