mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 12:46:47 +02:00
Fixing potentially infinite loop with logs in Color Picker (#5558)
This commit is contained in:
@@ -69,7 +69,7 @@ namespace ColorPicker.Helpers
|
|||||||
|
|
||||||
var methodName = stackTrace.GetFrame(3)?.GetMethod();
|
var methodName = stackTrace.GetFrame(3)?.GetMethod();
|
||||||
var className = methodName?.DeclaringType.Name;
|
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)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
if (retryCount > MaxNumberOfRetry)
|
||||||
|
{
|
||||||
|
retry = false;
|
||||||
|
}
|
||||||
|
|
||||||
Logger.LogError("Failed to read changed settings", ex);
|
Logger.LogError("Failed to read changed settings", ex);
|
||||||
|
Thread.Sleep(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user