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