From 9248f264f12efa5e5cbd5c438f3ab56f3aa6464a Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Tue, 27 Jul 2021 19:35:19 +0200 Subject: [PATCH] Fix too much checks for messages --- Logic/Osm/OsmConnection.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Logic/Osm/OsmConnection.ts b/Logic/Osm/OsmConnection.ts index 92a0823f65..bc81c7b05f 100644 --- a/Logic/Osm/OsmConnection.ts +++ b/Logic/Osm/OsmConnection.ts @@ -249,8 +249,13 @@ export class OsmConnection { }); } + private isChecking = false; private CheckForMessagesContinuously(){ const self =this; + if(this.isChecking){ + return; + } + this.isChecking = true; UIEventSource.Chronic(5 * 60 * 1000).addCallback(_ => { if (self.isLoggedIn .data) { console.log("Checking for messages")