summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-02-27 04:21:37 +0000
committergVisor bot <gvisor-bot@google.com>2021-02-27 04:21:37 +0000
commit0c7b403661d5dfdee9580fcc16a2921ec0a433af (patch)
treee2fb35843d16ac79d0e9d3acfadbe85be8e56f41 /pkg
parent40d818f3056d93f761e38bbd17822365cac2424a (diff)
parent037bb2f45abada02fb50b563f3d37381f88de7f5 (diff)
Merge release-20210208.0-105-g037bb2f45 (automated)
Diffstat (limited to 'pkg')
-rw-r--r--pkg/tcpip/transport/tcp/endpoint.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/tcpip/transport/tcp/endpoint.go b/pkg/tcpip/transport/tcp/endpoint.go
index 8c5be0586..83ec99fa9 100644
--- a/pkg/tcpip/transport/tcp/endpoint.go
+++ b/pkg/tcpip/transport/tcp/endpoint.go
@@ -1586,7 +1586,9 @@ func (e *endpoint) Write(p tcpip.Payloader, opts tcpip.WriteOptions) (int64, tcp
return e.drainSendQueueLocked(), len(v), nil
}()
- if err != nil {
+ // Return if either we didn't queue anything or if an error occurred while
+ // attempting to queue data.
+ if n == 0 || err != nil {
return 0, err
}
e.sendData(nextSeg)