]> Cypherpunks repositories - gostls13.git/commit
syscall: avoid convT2I allocs for ERROR_IO_PENDING instead of WSAEINPROGRESS
authorAlex Brainman <alex.brainman@gmail.com>
Sat, 10 Sep 2016 04:04:46 +0000 (14:04 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Sun, 11 Sep 2016 01:42:30 +0000 (01:42 +0000)
commitfca3dd3718080563f4bc6c4c8b6fbe681a1602fa
tree13bedd5bf2cd388a559979e88be5b532fdda06ae
parentf15915af4effbbe6895ae69be02d22ac016927d5
syscall: avoid convT2I allocs for ERROR_IO_PENDING instead of WSAEINPROGRESS

CL 28484 mistakenly assumed that WSARecv returns WSAEINPROGRESS
when there is nothing to read. But the error is ERROR_IO_PENDING.
Fix that mistake.

I was about to write a test for it. But I have found
TestTCPReadWriteAllocs in net package that does nearly what I need,
but was conveniently disabled. So enable and extend the test.

Fixes #16988

Change-Id: I55e5cf8998a9cf29e92b398d702280bdf7d6fc85
Reviewed-on: https://go-review.googlesource.com/28990
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/tcpsock_test.go
src/syscall/mksyscall_windows.go
src/syscall/zsyscall_windows.go