diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-06-01 17:33:35 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-06-01 17:33:35 +0000 |
commit | f8288fb908db1088c184f6f724ca6acd7365c09f (patch) | |
tree | 40477d48a2a64499d3640f5adad6cd567a3321be /pkg/tcpip/adapters/gonet | |
parent | 2bbd3fa5ff357fc4ef0a226a0d8ef91bc2a12036 (diff) | |
parent | 839208f118793c665f48a057d1f35d74979b7916 (diff) |
Merge release-20200522.0-45-g839208f1 (automated)
Diffstat (limited to 'pkg/tcpip/adapters/gonet')
-rw-r--r-- | pkg/tcpip/adapters/gonet/gonet.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/tcpip/adapters/gonet/gonet.go b/pkg/tcpip/adapters/gonet/gonet.go index 6e0db2741..d82ed5205 100644 --- a/pkg/tcpip/adapters/gonet/gonet.go +++ b/pkg/tcpip/adapters/gonet/gonet.go @@ -335,6 +335,11 @@ func (c *TCPConn) Read(b []byte) (int, error) { deadline := c.readCancel() numRead := 0 + defer func() { + if numRead != 0 { + c.ep.ModerateRecvBuf(numRead) + } + }() for numRead != len(b) { if len(c.read) == 0 { var err error |