summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/adapters/gonet
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-01-16 00:07:58 +0000
committergVisor bot <gvisor-bot@google.com>2021-01-16 00:07:58 +0000
commit06bcbc23fd8a186b0314fc8aae50545a972d7f5c (patch)
tree082d2058c07b5b9cb3e31e515519dd21d2269734 /pkg/tcpip/adapters/gonet
parent0b4604d503bfac4dfccd6f0b7e34b55dc2c9e36d (diff)
parent12d9790833cc2f6a9b197066a5ecbeb434f74164 (diff)
Merge release-20210112.0-37-g12d979083 (automated)
Diffstat (limited to 'pkg/tcpip/adapters/gonet')
-rw-r--r--pkg/tcpip/adapters/gonet/gonet.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/tcpip/adapters/gonet/gonet.go b/pkg/tcpip/adapters/gonet/gonet.go
index 85a0b8b90..fdeec12d3 100644
--- a/pkg/tcpip/adapters/gonet/gonet.go
+++ b/pkg/tcpip/adapters/gonet/gonet.go
@@ -295,7 +295,7 @@ func commonRead(b []byte, ep tcpip.Endpoint, wq *waiter.Queue, deadline <-chan s
w := tcpip.SliceWriter(b)
opts := tcpip.ReadOptions{NeedRemoteAddr: addr != nil}
- res, err := ep.Read(&w, len(b), opts)
+ res, err := ep.Read(&w, opts)
if err == tcpip.ErrWouldBlock {
// Create wait queue entry that notifies a channel.
@@ -303,7 +303,7 @@ func commonRead(b []byte, ep tcpip.Endpoint, wq *waiter.Queue, deadline <-chan s
wq.EventRegister(&waitEntry, waiter.EventIn)
defer wq.EventUnregister(&waitEntry)
for {
- res, err = ep.Read(&w, len(b), opts)
+ res, err = ep.Read(&w, opts)
if err != tcpip.ErrWouldBlock {
break
}