From f751453a3487ed8c25c3cab2cb80584833bbfc6d Mon Sep 17 00:00:00 2001 From: legonzaur Date: Fri, 5 May 2023 14:30:05 +0200 Subject: [PATCH] add ping on ws connect --- src/websocket.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/websocket.ts b/src/websocket.ts index a086779..842e162 100644 --- a/src/websocket.ts +++ b/src/websocket.ts @@ -34,6 +34,7 @@ wss.on('connection', function connection(ws: WebSocket & { isAlive: boolean }, r ws.isAlive = true } } + ws.ping(); }) const interval = setInterval(function ping() {