From c5815576e6fc683de929fbd94cde215407bed863 Mon Sep 17 00:00:00 2001 From: Antoine Arlaud Date: Tue, 5 Mar 2024 14:46:40 +0100 Subject: [PATCH] fix: avoid crash on closehandler --- lib/server/socketHandlers/closeHandler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/server/socketHandlers/closeHandler.ts b/lib/server/socketHandlers/closeHandler.ts index fa3b28129..1859006b5 100644 --- a/lib/server/socketHandlers/closeHandler.ts +++ b/lib/server/socketHandlers/closeHandler.ts @@ -25,7 +25,7 @@ export const handleConnectionCloseOnSocket = ( closeReason, maskedToken, hashedToken, - remainingConnectionsCount: clientPool.length, + remainingConnectionsCount: clientPool?.length || 0, }, 'client connection closed', );