test(sync): allow repeated relay e2e startup

This commit is contained in:
Timo
2026-08-25 21:43:12 +02:00
parent 8572d3694e
commit 213a639314
2 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -1137,7 +1137,8 @@ export async function stopServerForTests() {
peerJoinLocks.clear();
clearRateLimitMaps();
healthResponseCache.clear();
io.removeAllListeners();
// Keep the server's connection handler installed so an E2E process can
// stop and restart this singleton relay for a later isolated scenario.
io.disconnectSockets(true);
Object.assign(rateLimitDenied, { connections: 0, events: 0, health: 0, adminMetricsAuth: 0, roomList: 0, leaveRoom: 0 });
if (!httpServer.listening) return;