You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: drop direct sends from inactive server sockets #412
A retained server Socket continues to send direct events and complete acknowledgements after it has disconnected. Socket.IO 4.7.5 and 4.8.3 drop direct sends from the old Socket, and its emitWithAck() remains pending. Smocket should reject delivery from an inactive connection generation without changing normal delivery or teardown ordering.
Reproduction
constoldSocket=awaitserver.nextConnection();oldSocket.disconnect();awaitonce(client,'disconnect');oldSocket.emit('stale');constpending=oldSocket.emitWithAck('stale-ack');client.connect();constcurrentSocket=awaitserver.nextConnection();currentSocket.emit('marker');awaitonce(client,'marker');// Socket.IO: no stale event and pending ACK.// Smocket 0.5.1: stale event is delivered and ACK resolves.
smocket version
0.5.1
Environment
Node 24.11.1, Vitest 4.1.10, Socket.IO 4.7.5 and 4.8.3
Activity