Unverified Commit d40746e8 authored by Dan Jones's avatar Dan Jones
Browse files

fix: pass function to setTimeout

parent 3e437e7e
......@@ -97,7 +97,7 @@ class Adapter {
this.poll()
.then(() => {
if (this.pollTimer) clearTimeout(this.pollTimer);
this.pollTimer = setTimeout(this.poll(), interval*1000);
this.pollTimer = setTimeout(this.poll, interval*1000);
});
}
......
......@@ -99,7 +99,7 @@ class Adapter {
this.poll()
.then(() => {
if (this.pollTimer) clearTimeout(this.pollTimer);
this.pollTimer = setTimeout(this.poll(), interval*1000);
this.pollTimer = setTimeout(this.poll, interval*1000);
});
}
......
......@@ -97,7 +97,7 @@ export class Adapter {
this.poll()
.then(() => {
if (this.pollTimer) clearTimeout(this.pollTimer);
this.pollTimer = setTimeout(this.poll(), interval*1000);
this.pollTimer = setTimeout(this.poll, interval*1000);
});
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment