-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Description
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version go1.10.1 windows/amd64
Does this issue reproduce with the latest release?
Yes - it seems to have been there for ages.
What operating system and processor architecture are you using (go env)?
I use Windows 10 64 bit.
What did you do?
The easiest way to see and reproduce the problem is by using the proof-of-concept tools.
First the server part - you can download it from here: https://pastebin.com/NUdxuMDw
Start the server on any PC that has TCP port 11111 open and accessible.
OS of the server machine does not matter.
Now download the actual test client: https://pastebin.com/SFQyyHfb
Run the test client on Windows.
You just need to specify one parameter on the command line: IP or host name of your running server (the one with open TCP port 11111).
The test is supposed to send 1MB of data to the server.
But you will see that it actually sends more....
The reason for it, is that whenever the Write() function returns a timeout, it always returns n=0.
Which seems to be wrong, as you can sometimes see some data going through.
This problem does not occur when you run the same code on Linux (there you can actually see n>0 being returned).
I have not checked other platforms.
What did you expect to see?
Always 1MB of data received at the server side.
What did you see instead?
More than 1MB of data received at the server side.