mirror of
https://github.com/meshcore-dev/meshcore.js.git
synced 2026-04-20 22:13:49 +00:00
fix removing error listeners
This commit is contained in:
parent
536e7641e0
commit
352333153c
1 changed files with 3 additions and 3 deletions
|
|
@ -1428,7 +1428,7 @@ class Connection extends EventEmitter {
|
|||
const onSent = (response) => {
|
||||
|
||||
// remove error listener since we received sent response
|
||||
this.once(Constants.ResponseCodes.Err, onErr);
|
||||
this.off(Constants.ResponseCodes.Err, onErr);
|
||||
|
||||
// reject login request as timed out after estimated delay, plus a bit extra
|
||||
const estTimeout = response.estTimeout + extraTimeoutMillis;
|
||||
|
|
@ -1491,7 +1491,7 @@ class Connection extends EventEmitter {
|
|||
const onSent = (response) => {
|
||||
|
||||
// remove error listener since we received sent response
|
||||
this.once(Constants.ResponseCodes.Err, onErr);
|
||||
this.off(Constants.ResponseCodes.Err, onErr);
|
||||
|
||||
// reject login request as timed out after estimated delay, plus a bit extra
|
||||
const estTimeout = response.estTimeout + extraTimeoutMillis;
|
||||
|
|
@ -1576,7 +1576,7 @@ class Connection extends EventEmitter {
|
|||
const onSent = (response) => {
|
||||
|
||||
// remove error listener since we received sent response
|
||||
this.once(Constants.ResponseCodes.Err, onErr);
|
||||
this.off(Constants.ResponseCodes.Err, onErr);
|
||||
|
||||
// reject as timed out after estimated delay, plus a bit extra
|
||||
const estTimeout = response.estTimeout + extraTimeoutMillis;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue