mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-04 20:21:18 +08:00
Fixing potentially infinite loop with logs in Color Picker (#5558)
This commit is contained in:
parent
84127d7a80
commit
62f57b134a
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user