chore: more descriptive logging of connection close

This commit is contained in:
Adhiraj Singh
2022-05-02 13:24:59 +05:30
parent 221b95050f
commit 3ac5eafc63

View File

@@ -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)