diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-11-18 07:02:07 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-11-18 07:02:07 +0000 |
commit | 1689e833e305187d06032c4ff127d1024f0d98b7 (patch) | |
tree | f51f83c6b5bc2cbe920812554fae6f91e7426b46 | |
parent | 7ee5b7717bc7fb986dc2bd3823e0891cff6a692d (diff) | |
parent | 0e32d98f3a5d4f81459635efcaa53898f43996b9 (diff) |
Merge release-20201109.0-67-g0e32d98f3 (automated)
-rw-r--r-- | pkg/tcpip/transport/tcp/endpoint.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/tcpip/transport/tcp/endpoint.go b/pkg/tcpip/transport/tcp/endpoint.go index a2161e49d..173cd28ec 100644 --- a/pkg/tcpip/transport/tcp/endpoint.go +++ b/pkg/tcpip/transport/tcp/endpoint.go @@ -1330,7 +1330,10 @@ func (e *endpoint) Read(*tcpip.FullAddress) (buffer.View, tcpip.ControlMessages, if s := e.EndpointState(); !s.connected() && s != StateClose && bufUsed == 0 { e.rcvListMu.Unlock() if s == StateError { - return buffer.View{}, tcpip.ControlMessages{}, e.hardErrorLocked() + if err := e.hardErrorLocked(); err != nil { + return buffer.View{}, tcpip.ControlMessages{}, err + } + return buffer.View{}, tcpip.ControlMessages{}, tcpip.ErrClosedForReceive } e.stats.ReadErrors.NotConnected.Increment() return buffer.View{}, tcpip.ControlMessages{}, tcpip.ErrNotConnected |