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 GitHub
parent 84127d7a80
commit 62f57b134a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -69,7 +69,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

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