mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Add segment dequeue check while emptying segment queue.
PiperOrigin-RevId: 282023891
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user