We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a585f2b commit c99848fCopy full SHA for c99848f
src/models/Service.js
@@ -6,6 +6,7 @@ export default class Service {
6
id = '';
7
recipe = '';
8
webview = null;
9
+ timer = null;
10
events: {};
11
12
isAttached = false;
src/stores/ServicesStore.js
@@ -589,12 +589,16 @@ export default class ServicesStore extends Store {
589
const delay = 1000;
590
591
if (service) {
592
+ if (service.timer !== null) {
593
+ clearTimeout(service.timer)
594
+ }
595
+
596
const loop = () => {
597
if (!service.webview) return;
598
599
service.webview.send('poll');
600
- setTimeout(loop, delay);
601
+ service.timer = setTimeout(loop, delay);
602
};
603
604
loop();
0 commit comments