From 3ac5eafc6396f976013f06ead55de0c00d7fd439 Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Mon, 2 May 2022 13:24:59 +0530 Subject: [PATCH] chore: more descriptive logging of connection close --- src/Socket/socket.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Socket/socket.ts b/src/Socket/socket.ts index c2fd749..56e5a1f 100644 --- a/src/Socket/socket.ts +++ b/src/Socket/socket.ts @@ -288,7 +288,10 @@ export const makeSocket = ({ } const end = (error: Error | undefined) => { - logger.info({ error }, 'connection closed') + logger.info( + { error, trace: error?.stack }, + error ? 'connection errored' : 'connection closed' + ) clearInterval(keepAliveReq) clearTimeout(qrTimer)