Join GitHub today
GitHub is home to over 40 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.)
Added some assertions to testHandshake, but avoided checking the error of one of the Close() because the one that would lose the race would write the closeNotify to a connection closed on the other side which is broken on js/wasm (#28650). Moved that Close() after the chan sync to ensure it happens second. Accepting a ticket with client certificates when NoClientCert is configured is probably not a problem, and we could hide them to avoid confusing the application, but the current behavior is to skip the ticket, and I'd rather keep behavior changes to a minimum. Updates #9671 Change-Id: I93b56e44ddfe3d48c2bef52c83285ba2f46f297a Reviewed-on: https://go-review.googlesource.com/c/147445 Reviewed-by: Adam Langley <email@example.com>