Skip to content

Commit

Permalink
fix: prevent stopInclusion/Exclusion to throw (#979)
Browse files Browse the repository at this point in the history
* fix: prevent stopInclusion/Exclusion to throw

Fixes #959

* fix: lint issues
  • Loading branch information
robertsLando authored Mar 31, 2021
1 parent d407473 commit 6055834
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ZwaveClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -2178,7 +2178,7 @@ ZwaveClient.prototype.replaceFailedNode = async function (nodeId, secure) {
}

this.commandsTimeout = setTimeout(
this.stopInclusion.bind(this),
() => this.stopInclusion().catch(logger.error),
this.cfg.commandsTimeout * 1000 || 30000
)
// by default replaceFailedNode is secured, pass true to make it not secured
Expand All @@ -2202,7 +2202,7 @@ ZwaveClient.prototype.startInclusion = async function (secure) {
}

this.commandsTimeout = setTimeout(
this.stopInclusion.bind(this),
() => this.stopInclusion().catch(logger.error),
this.cfg.commandsTimeout * 1000 || 30000
)
// by default beginInclusion is secured, pass true to make it not secured
Expand All @@ -2225,7 +2225,7 @@ ZwaveClient.prototype.startExclusion = async function () {
}

this.commandsTimeout = setTimeout(
this.stopExclusion.bind(this),
() => this.stopExclusion.catch(logger.error),
this.cfg.commandsTimeout * 1000 || 30000
)

Expand Down

0 comments on commit 6055834

Please sign in to comment.