badeend requested fitzgen for a review on PR #7690.
badeend opened PR #7690 from badeend:reuseaddr
to bytecodealliance:main
:
In #7662 the call to
bind_existing_tcp_listener
was replaced withrustix::net::bind
. Unfortunately, besides callingbind
,bind_existing_tcp_listener
also setSO_REUSEADDR
. This PR restores that behavior. I've added an integration test and a note to the WITs too.Unrelated: I also removed the workarounds in the Bind tests:
// Concurrent invocations of this test can yield `AddressInUse` and that // same error can show up on Windows as `AccessDenied`. Err(ErrorCode::AddressInUse | ErrorCode::AccessDenied) => return,
by using a random generated port instead of a single constant.
badeend requested wasmtime-core-reviewers for a review on PR #7690.
badeend updated PR #7690.
alexcrichton submitted PR review.
rylev submitted PR review.
rylev submitted PR review.
rylev created PR review comment:
/// When binding to a non-zero port, this bind operation shouldn't be affected by the TIME_WAIT /// state of a recently closed socket on the same local address (i.e., the SO_REUSEADDR socket /// option should be set implicitly on platforms that require it).
badeend updated PR #7690.
badeend commented on PR #7690:
This should be good to go again.
In ran into EADDRINUSE issues on my local machine when binding to a specific (but random) port. So I've modified the tests to give it a few attempts.
alexcrichton submitted PR review.
alexcrichton merged PR #7690.
Last updated: Nov 22 2024 at 16:03 UTC