From 3fd69ce4758ff16e332df0ab0a9940fef42c5578 Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Wed, 23 Jun 2021 08:21:18 +0930 Subject: [PATCH] fix: missing message string --- app/mothership/custom-socket.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/mothership/custom-socket.ts b/app/mothership/custom-socket.ts index fa278161f..76ef6ed81 100644 --- a/app/mothership/custom-socket.ts +++ b/app/mothership/custom-socket.ts @@ -227,7 +227,7 @@ export class CustomSocket { await sleep(ONE_SECOND * 5); } }; - return async function (this: WebSocketWithHeartBeat, code: number) { + return async function (this: WebSocketWithHeartBeat, code: number, message: string) { try { // Log disconnection logger.error('HTTP connection closed with code=%s reason="%s"', code, code === 1006 ? 'Terminated' : message); @@ -245,7 +245,7 @@ export class CustomSocket { await responses[500](); } } catch (error: unknown) { - logger.error('HTTP connection closed with code=%s reason="%s"', code, (error as Error).message); + logger.error('HTTP connection closed with code=%s caught_error="%s"', code, (error as Error).message); } // We shouldn't reconnect