github selkies-project/selkies d6ce15f

pre-releaseone hour ago

fix(ws): Stop hearing a revoked page and end its socket

A token table that revoked or demoted a page closed its socket with
4002 and waited for the page to go. One that left the close unanswered
kept its socket, and its input was still taken under the role it had
connected with. Sockets were closed one after another, up to 2 s each,
so a stalled one also kept the next one's page heard.

Every page to be closed is now marked before the first close is waited
on, and what a marked page sends is dropped; a message costs one flag
read. A marked page still there 2 s later is torn down, releasing its
display and slots. The writer's close waits for the peer's at most the
10 s a stalled send is given. Each transport reconciles in a task of its
own, so one does not hold the other.

A raw client that ignored the close and kept sending got 4002 at once
on both builds: on main it was still connected 30 s later, and here the
connection ended after 14 s. The new test fails with the two checks
off; the 875 unit tests passed before the writer's bound, and the 262
WebSockets tests with it.

Don't miss a new selkies release

NewReleases is sending notifications on new releases.