summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport/tcp/accept.go
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2018-05-29 14:23:17 -0700
committerShentubot <shentubot@google.com>2018-05-29 14:24:07 -0700
commitc5dc873e441706e8aaff7389e26c862f1386c6a8 (patch)
treeb29bb76081379a2aec47fe3ea3d666423a4de45b /pkg/tcpip/transport/tcp/accept.go
parenta8b90a7158d4197428639c912d97f3bdbaf63f5a (diff)
Automated rollback of changelist 196886839
PiperOrigin-RevId: 198457660 Change-Id: I6ea5cf0b4cfe2b5ba455325a7e5299880e5a088a
Diffstat (limited to 'pkg/tcpip/transport/tcp/accept.go')
-rw-r--r--pkg/tcpip/transport/tcp/accept.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/pkg/tcpip/transport/tcp/accept.go b/pkg/tcpip/transport/tcp/accept.go
index ac213e310..a71cb444f 100644
--- a/pkg/tcpip/transport/tcp/accept.go
+++ b/pkg/tcpip/transport/tcp/accept.go
@@ -349,17 +349,13 @@ func (e *endpoint) protocolListenLoop(rcvWnd seqnum.Size) *tcpip.Error {
// to the endpoint.
e.mu.Lock()
e.state = stateClosed
+ e.mu.Unlock()
// Notify waiters that the endpoint is shutdown.
e.waiterQueue.Notify(waiter.EventIn | waiter.EventOut)
// Do cleanup if needed.
- e.completeWorkerLocked()
-
- if e.drainDone != nil {
- close(e.drainDone)
- }
- e.mu.Unlock()
+ e.completeWorker()
}()
e.mu.Lock()