From be6ef85fa4c7fb7e4ffb9963f307301d6c489d16 Mon Sep 17 00:00:00 2001 From: F K <54195004+fredjk-gh@users.noreply.github.com> Date: Sun, 24 Jul 2022 17:17:18 -0400 Subject: [PATCH] Fix boolean logic bug that slows ancillary file reading to a crawl (#93) Symptoms: App takes a very long time to start up, sluggish response to events because it's reading and processing every ancillary file 10x instead of just once when successful. --- ObservatoryCore/LogMonitor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ObservatoryCore/LogMonitor.cs b/ObservatoryCore/LogMonitor.cs index d01a69c..8539835 100644 --- a/ObservatoryCore/LogMonitor.cs +++ b/ObservatoryCore/LogMonitor.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -352,7 +352,7 @@ namespace Observatory string fileContent = null; int retryCount = 0; - while (fileContent == null || retryCount < 10) + while (fileContent == null && retryCount < 10) { System.Threading.Thread.Sleep(50); try