Skip to content

Commit b7213e7

Browse files
test: fix flaky test
`srv.close()` only closes the underlying HTTP server, but this does not terminate the existing WebSocket connections. Reference: https://nodejs.org/api/http.html#serverclosecallback
1 parent 2da8210 commit b7213e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/socket.io.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ describe("socket.io", () => {
10731073
reconnectionDelay: 100,
10741074
});
10751075
clientSocket.on("connect", () => {
1076-
srv.close();
1076+
sio.close();
10771077
});
10781078

10791079
clientSocket.io.on("reconnect_failed", () => {

0 commit comments

Comments
 (0)