From 67e50be52699e793bc89a786465e841a18950fae Mon Sep 17 00:00:00 2001 From: Vladimir Varankin Date: Tue, 23 Jan 2024 01:31:00 +0100 Subject: [PATCH] transport: Remove redundant if in handleGoAway (#6930) --- internal/transport/http2_client.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/transport/http2_client.go b/internal/transport/http2_client.go index 141f5893c7ec..c33ac5961b2f 100644 --- a/internal/transport/http2_client.go +++ b/internal/transport/http2_client.go @@ -1325,10 +1325,8 @@ func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) { for streamID, stream := range t.activeStreams { if streamID > id && streamID <= upperLimit { // The stream was unprocessed by the server. - if streamID > id && streamID <= upperLimit { - atomic.StoreUint32(&stream.unprocessed, 1) - streamsToClose = append(streamsToClose, stream) - } + atomic.StoreUint32(&stream.unprocessed, 1) + streamsToClose = append(streamsToClose, stream) } } t.mu.Unlock()