Compare commits

...
Sign in to create a new pull request.
Author SHA1 Message Date
Libby
529fcd92a0 cultnet-ts test: the reconnecting client sends only after its own handshake completes
Some checks failed
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Has been cancelled
The server accepting the reconnect is not the client hearing the Accept; sending in
that window throws 'before the session is connected' (forge run 1331).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-11 16:01:12 +00:00

View file

@ -115,6 +115,8 @@ test("a client reconnecting from the same endpoint replaces only its own session
assert.throws(() => server.send(oldPeer, "schema", enc("stale")), /not connected/);
assert.equal(server.peers.length, 2);
// The server accepting is not the client hearing it: send only once the client's new session is connected.
await waitFor(() => a.connection.connected, "the reconnecting client's handshake");
a.connection.send("schema", enc("after"));
b.connection.send("schema", enc("still"));
await waitFor(() => a.received.includes("re:after") && b.received.includes("re:still"), "replies after the reconnect");