diff options
author | Zhaozhong Ni <nzz@google.com> | 2018-07-30 15:42:01 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-07-30 15:43:25 -0700 |
commit | 0a55f8c1c11dc6d2dfb1bed02489f92bab437ea1 (patch) | |
tree | 803d15586a86a79f30e2905d03ad06a11fe38bee /pkg/tcpip/transport/tcp/connect.go | |
parent | 3188859742e802a2e7d1d5d0ab22a6e2b426dfb8 (diff) |
netstack: support disconnect-on-save option per fdbased link.
PiperOrigin-RevId: 206659972
Change-Id: I5e0e035f97743b6525ad36bed2c802791609beaf
Diffstat (limited to 'pkg/tcpip/transport/tcp/connect.go')
-rw-r--r-- | pkg/tcpip/transport/tcp/connect.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/tcpip/transport/tcp/connect.go b/pkg/tcpip/transport/tcp/connect.go index 8d70eb45a..b90d3fe48 100644 --- a/pkg/tcpip/transport/tcp/connect.go +++ b/pkg/tcpip/transport/tcp/connect.go @@ -1023,7 +1023,9 @@ func (e *endpoint) protocolMainLoop(handshake bool) *tcpip.Error { // Mark endpoint as closed. e.mu.Lock() - e.state = stateClosed + if e.state != stateError { + e.state = stateClosed + } // Lock released below. epilogue() |