From ef6e3df9dff3bc6a1e5bb56b2d996a43d5152e4c Mon Sep 17 00:00:00 2001 From: Lorenzo Blasa Date: Thu, 24 Aug 2023 10:05:17 -0700 Subject: [PATCH] Remove the client from error log Summary: Removing this information from the error as it will cause duplicated error tasks. Reviewed By: passy Differential Revision: D48646678 fbshipit-source-id: 26e5525318b4720568275a5086df00f21b7d2836 --- .../flipper-server-core/src/server/attachSocketServer.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/desktop/flipper-server-core/src/server/attachSocketServer.tsx b/desktop/flipper-server-core/src/server/attachSocketServer.tsx index 55116c5644b..b33bbcc5185 100644 --- a/desktop/flipper-server-core/src/server/attachSocketServer.tsx +++ b/desktop/flipper-server-core/src/server/attachSocketServer.tsx @@ -228,10 +228,9 @@ export function attachSocketServer( }); async function onClientClose(error: Error | undefined = undefined) { + console.log(`Client disconnected ${clientAddress}`); if (error) { - console.error(`Client disconnected ${clientAddress} with error`, error); - } else { - console.log(`Client disconnected ${clientAddress}`); + console.error('Client disconnected with error', error); } numberOfConnectedClients--;