Minor cleanup
This commit is contained in:
@@ -107,6 +107,10 @@ for (let i = 0; i < options.sessions; i++) {
|
|||||||
sessionLogger.info(
|
sessionLogger.info(
|
||||||
`Connected, sending bind_transciever with systemId '${options.systemid}' and password '${options.password}'...`
|
`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(
|
session.bind_transceiver(
|
||||||
{
|
{
|
||||||
system_id: options.systemid,
|
system_id: options.systemid,
|
||||||
|
1
utils.js
1
utils.js
@@ -89,7 +89,6 @@ async function sendPdu(session, pdu, logger, uselongsms) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
session.send(pdu, (respPdu) => {
|
session.send(pdu, (respPdu) => {
|
||||||
console.log(respPdu);
|
|
||||||
if (respPdu.command_status === 0) {
|
if (respPdu.command_status === 0) {
|
||||||
resolve(respPdu);
|
resolve(respPdu);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user