From 305ef81b015d97e5d9c490a0c465302a6faf658b Mon Sep 17 00:00:00 2001 From: liamcottle Date: Thu, 13 Feb 2025 23:59:46 +1300 Subject: [PATCH] add missing event listeners --- src/connection/connection.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/connection/connection.js b/src/connection/connection.js index 350d06a..ae459b5 100644 --- a/src/connection/connection.js +++ b/src/connection/connection.js @@ -383,6 +383,10 @@ class Connection extends EventEmitter { reject(); } + // listen for events + this.once(Constants.ResponseCodes.Ok, onOk); + this.once(Constants.ResponseCodes.Err, onErr); + // compose message const txtType = Constants.TxtTypes.Plain; const senderTimestamp = Math.floor(Date.now() / 1000);