From dfdb5bce2c9d5386f844cb334823715d9b3d04e8 Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Mon, 2 Nov 2020 14:11:03 +0200 Subject: [PATCH] revert Cluster#bindEvents() change Signed-off-by: Jari Kolehmainen --- src/main/cluster.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/main/cluster.ts b/src/main/cluster.ts index 25ed90531d..656ee67cdb 100644 --- a/src/main/cluster.ts +++ b/src/main/cluster.ts @@ -127,20 +127,19 @@ export class Cluster implements ClusterModel, ClusterState { } protected bindEvents() { - if (!ipcMain) { - return - } logger.info(`[CLUSTER]: bind events`, this.getMeta()) const refreshTimer = setInterval(() => !this.disconnected && this.refresh(), 30000) // every 30s const refreshMetadataTimer = setInterval(() => !this.disconnected && this.refreshMetadata(), 900000) // every 15 minutes - this.eventDisposers.push( - reaction(() => this.getState(), () => this.pushState()), - () => { - clearInterval(refreshTimer) - clearInterval(refreshMetadataTimer) - }, - ); + if (ipcMain) { + this.eventDisposers.push( + reaction(() => this.getState(), () => this.pushState()), + () => { + clearInterval(refreshTimer) + clearInterval(refreshMetadataTimer) + }, + ); + } } protected unbindEvents() {