aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/interval_utils.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-09-06 23:49:51 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-09-06 23:49:51 +0800
commitb1feb5ac29bf2dbe424a5485eb3e48e90c08ba94 (patch)
tree72d2099e3cff190e2d9a57af138f7d0e751f4e9e /src/utils/interval_utils.ts
parent873aa26f63b8266078ce3cf90e3a9ae65301ae1b (diff)
downloaddexon-sol-tools-b1feb5ac29bf2dbe424a5485eb3e48e90c08ba94.tar
dexon-sol-tools-b1feb5ac29bf2dbe424a5485eb3e48e90c08ba94.tar.gz
dexon-sol-tools-b1feb5ac29bf2dbe424a5485eb3e48e90c08ba94.tar.bz2
dexon-sol-tools-b1feb5ac29bf2dbe424a5485eb3e48e90c08ba94.tar.lz
dexon-sol-tools-b1feb5ac29bf2dbe424a5485eb3e48e90c08ba94.tar.xz
dexon-sol-tools-b1feb5ac29bf2dbe424a5485eb3e48e90c08ba94.tar.zst
dexon-sol-tools-b1feb5ac29bf2dbe424a5485eb3e48e90c08ba94.zip
Fix a bug in intervalUtils
Diffstat (limited to 'src/utils/interval_utils.ts')
-rw-r--r--src/utils/interval_utils.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/interval_utils.ts b/src/utils/interval_utils.ts
index 23e6acc5b..6bcf5a643 100644
--- a/src/utils/interval_utils.ts
+++ b/src/utils/interval_utils.ts
@@ -4,7 +4,7 @@ export class IntervalUtils {
private mutex: {[intervalId: number]: boolean} = {};
public setAsyncExcludingInterval(fn: () => Promise<void>, intervalMs: number) {
const intervalId = setInterval(async () => {
- if (_.isUndefined(this.mutex[intervalId])) {
+ if (!_.isUndefined(this.mutex[intervalId])) {
return;
} else {
this.mutex[intervalId] = true;