Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
net: only js/wasm returns an error on writes to closed connections #28650
If a localhost connection is closed by the peer, all other GOOS seem to allow writes to happen without error, while js/wasm returns
I admit it does feel like something that should return an error, and I don't know if there is a precise requirement to do otherwise, but js being the only GOOS to do it is very inconsistent, and not even NaCl on the playground with its fictitious network returns an error.
This came up because js/wasm were the only broken TryBots in some crypto/tls CL: https://storage.googleapis.com/go-build-log/ca02321c/js-wasm_d63aa3d8.log
Unfortunately, the fake implementation of TCP-like byte-sequence full-duplex pipe on JS is broken from the beginning. Also, it doubles the maintenance cost by having each implementation on NaCl and JS. I have a CL that may solve the issues: https://go-review.googlesource.com/c/go/+/120958, but it will probably land in Go 1.13 or above.
Can you please skip the roadblock test cases for now?
Just for congestion control; the plan for Go 1.12 had AIX and Fuchsia ports that need to churn up the runtime, os and net packages. Like other communication protocols, congestion control is reviewee/sender side's responsibility (and flow control is reviewer/receiver side's responsibility.)