summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-11-13 22:44:33 +0000
committergVisor bot <gvisor-bot@google.com>2019-11-13 22:44:33 +0000
commit34250c302736c722362acfc2a717c84eedf4c769 (patch)
tree30a8d7fcf17eb6d5b4abbf2d9e85586aa7fb584f /pkg/tcpip
parentd3e82792170b773f5b81968376202cc57796fdc5 (diff)
parent6dd4c9ee74828b27cd12ea343756f5625bae683c (diff)
Merge release-20191104.0-38-g6dd4c9e (automated)
Diffstat (limited to 'pkg/tcpip')
-rw-r--r--pkg/tcpip/transport/tcp/connect.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/tcpip/transport/tcp/connect.go b/pkg/tcpip/transport/tcp/connect.go
index a114c06c1..be066d877 100644
--- a/pkg/tcpip/transport/tcp/connect.go
+++ b/pkg/tcpip/transport/tcp/connect.go
@@ -1229,7 +1229,9 @@ func (e *endpoint) protocolMainLoop(handshake bool) *tcpip.Error {
return err
}
}
- if e.state != StateError {
+ if e.state != StateClose && e.state != StateError {
+ // Only block the worker if the endpoint
+ // is not in closed state or error state.
close(e.drainDone)
<-e.undrain
}