Skip to content

Commit 21412aa

Browse files
committed
fix: set max listeners to infinity to avoid warnings when using multiplexing
1 parent 8d8d4cf commit 21412aa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/server/src/Server.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ export class Server {
6666
this.webSocketServer.on(
6767
"connection",
6868
async (incoming: WebSocket, request: IncomingMessage) => {
69+
incoming.setMaxListeners(Number.POSITIVE_INFINITY);
70+
6971
incoming.on("error", (error) => {
7072
/**
7173
* Handle a ws instance error, which is required to prevent

0 commit comments

Comments
 (0)