summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-11-22 21:19:18 +0000
committergVisor bot <gvisor-bot@google.com>2019-11-22 21:19:18 +0000
commit70f9648aacbb789775e189e3c058c325141be3c4 (patch)
tree7a624895f3a27b2a4c8c1123ff581cf13373bd6d /pkg/tcpip
parent7912c51bc928278abdcdc143f14eb2bf8531b66a (diff)
parentf27f38d13717a25721efb2b37fabadae5c34e374 (diff)
Merge release-20191114.0-21-gf27f38d (automated)
Diffstat (limited to 'pkg/tcpip')
-rw-r--r--pkg/tcpip/transport/tcp/connect.go5
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)
}