From f8a8365f90a02019a067bf091821067ca0ef1c14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Majdand=C5=BEi=C4=87?= Date: Mon, 4 Dec 2023 13:01:57 +0100 Subject: [PATCH] Minor cleanup --- client.js | 4 ++++ utils.js | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/client.js b/client.js index f03204d..e578333 100644 --- a/client.js +++ b/client.js @@ -107,6 +107,10 @@ for (let i = 0; i < options.sessions; i++) { sessionLogger.info( `Connected, sending bind_transciever with systemId '${options.systemid}' and password '${options.password}'...` ); + session.on('close', function () { + sessionLogger.error(`Session closed`); + process.exit(1); + }); session.bind_transceiver( { system_id: options.systemid, diff --git a/utils.js b/utils.js index be14f3c..a5b19a8 100644 --- a/utils.js +++ b/utils.js @@ -89,7 +89,6 @@ async function sendPdu(session, pdu, logger, uselongsms) { } } else { session.send(pdu, (respPdu) => { - console.log(respPdu); if (respPdu.command_status === 0) { resolve(respPdu); } else {