Skip to content

Commit

Permalink
Remove the client from error log
Browse files Browse the repository at this point in the history
Summary: Removing this information from the error as it will cause duplicated error tasks.

Reviewed By: passy

Differential Revision: D48646678

fbshipit-source-id: 26e5525318b4720568275a5086df00f21b7d2836
  • Loading branch information
lblasa authored and facebook-github-bot committed Aug 24, 2023
1 parent ecc50f4 commit ef6e3df
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions desktop/flipper-server-core/src/server/attachSocketServer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
Expand Down

0 comments on commit ef6e3df

Please sign in to comment.