diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-11-22 21:19:18 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-11-22 21:19:18 +0000 |
commit | 70f9648aacbb789775e189e3c058c325141be3c4 (patch) | |
tree | 7a624895f3a27b2a4c8c1123ff581cf13373bd6d /pkg/tcpip | |
parent | 7912c51bc928278abdcdc143f14eb2bf8531b66a (diff) | |
parent | f27f38d13717a25721efb2b37fabadae5c34e374 (diff) |
Merge release-20191114.0-21-gf27f38d (automated)
Diffstat (limited to 'pkg/tcpip')
-rw-r--r-- | pkg/tcpip/transport/tcp/connect.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/tcpip/transport/tcp/connect.go b/pkg/tcpip/transport/tcp/connect.go index 364067731..75b7c0828 100644 --- a/pkg/tcpip/transport/tcp/connect.go +++ b/pkg/tcpip/transport/tcp/connect.go @@ -1368,8 +1368,11 @@ func (e *endpoint) protocolMainLoop(handshake bool) *tcpip.Error { // unlocks e.mu. Now that no new segments can get enqueued to this // endpoint, try to re-match the segment to a different endpoint // as the current endpoint is closed. - for !e.segmentQueue.empty() { + for { s := e.segmentQueue.dequeue() + if s == nil { + break + } e.tryDeliverSegmentFromClosedEndpoint(s) } |