Fixing potentially infinite loop with logs in Color Picker (#5558)

This commit is contained in:
martinchrzan 2020-08-03 22:03:00 +02:00 committed by Enrico Giordani
parent d323611ecb
commit 76ab389e88
2 changed files with 7 additions and 1 deletions

View file

@ -64,7 +64,7 @@ namespace ColorPicker.Helpers
var methodName = stackTrace.GetFrame(3)?.GetMethod();
var className = methodName?.DeclaringType.Name;
return "[Method]: " + methodName.Name + " [Class]: " + className;
return "[Method]: " + methodName?.Name + " [Class]: " + className;
}
}
}

View file

@ -78,7 +78,13 @@ namespace ColorPicker.Settings
}
catch (Exception ex)
{
if (retryCount > MaxNumberOfRetry)
{
retry = false;
}
Logger.LogError("Failed to read changed settings", ex);
Thread.Sleep(500);
}
}
};