Skip to content

net: only js/wasm returns an error on writes to closed connections #28650

Open
@FiloSottile

Description

@FiloSottile

If a localhost connection is closed by the peer, all other GOOS seem to allow writes to happen without error, while js/wasm returns write tcp 127.0.0.1:XXX->127.0.0.1:1: Socket is not connected with XXX changing.

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

https://play.golang.org/p/lRhq44NJXTr (this specific program will actually panic on js/wasm due to #28649, but it proves the log.Print is being reached)

/cc @neelance

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.OS-JSarch-wasmWebAssembly issues

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions