]> Cypherpunks repositories - gostls13.git/commit
net: in the fake implementation, allow writes to buffer on closed connections
authorBryan C. Mills <bcmills@google.com>
Fri, 26 Jan 2024 17:23:01 +0000 (12:23 -0500)
committerGopher Robot <gobot@golang.org>
Mon, 29 Jan 2024 21:29:57 +0000 (21:29 +0000)
commit47d240ccbb40425b49f14e21145d01dda542a21c
tree5899a53a4431083edffd39827ce157543dafc259
parentb91bad78199aaf8baeb66cb8a30f51b89b8f90ee
net: in the fake implementation, allow writes to buffer on closed connections

This mimics the apparent behavior of writes on linux/amd64, in which a
write on an already-closed connection silently succeeds — even if the
connection has already been closed by the remote end — provided that
the packet fits in the kernel's send buffer.

I tested this by patching in CL 557437 and running the test on js/wasm
and wasip1/wasm locally.

Fixes #64317.

Change-Id: I43f6a89e5059115cb61e4ffc33a8371057cb67a1
Reviewed-on: https://go-review.googlesource.com/c/go/+/558915
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/net/net_fake.go