We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a529eb0 commit 683720aCopy full SHA for 683720a
test/index.ts
@@ -37,15 +37,16 @@ describe("@socket.io/cluster-adapter", () => {
37
PORT,
38
});
39
40
- const clientSocket = ioc(`http://localhost:${PORT}`);
41
- clientSocket.on("connect", async () => {
42
- workers.push(worker);
43
- clientSockets.push(clientSocket);
44
- if (clientSockets.length === NODES_COUNT) {
45
- await sleep(100);
46
-
47
- done();
48
- }
+ worker.on("listening", () => {
+ const clientSocket = ioc(`http://localhost:${PORT}`);
+
+ clientSocket.on("connect", async () => {
+ workers.push(worker);
+ clientSockets.push(clientSocket);
+ if (clientSockets.length === NODES_COUNT) {
+ done();
+ }
49
+ });
50
51
}
52
0 commit comments