Skip to content

Commit

Permalink
Dont catch cancellation exception on PreventSleep
Browse files Browse the repository at this point in the history
  • Loading branch information
bagusnl committed May 18, 2024
1 parent 940ee95 commit d9e12e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Hi3Helper.Core/Classes/Data/InvokeProp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@ public static async void PreventSleep()
await Task.Delay(60000, _preventSleepToken.Token);
}
}
catch (TaskCanceledException)
{
//do nothing, its cancelled :)
}
catch (Exception e)
{
LogWriteLine($"[InvokeProp::PreventSleep()] Errors while preventing sleep!\r\n{e}",
Expand Down

0 comments on commit d9e12e1

Please sign in to comment.