Fix CloseHandle return value logic
MODIFY
WalletWasabi/Helpers/PowerSaving/WindowsPowerAvailabilityTask.cs
WalletWasabi/Helpers/PowerSaving/WindowsPowerAvailabilityTask.cs
@@ -161,7 +161,7 @@ namespace WalletWasabi.Helpers.PowerSaving
Logger.LogTrace("Clear the power request.");
PowerClearRequest(_request, RequestType);
- if (CloseHandle(_request) != 0)
+ if (CloseHandle(_request) == 0)
{
// This should never happen.
Logger.LogError($"Failed to close handle (last Win32 error: {Marshal.GetLastWin32Error()}).");

Fix CloseHandle return value logic