Skip to content

Commit

Permalink
fix offline status
Browse files Browse the repository at this point in the history
wrong exception type catched so IsPortOpen would not return false as expected
  • Loading branch information
georg-jung committed May 19, 2020
1 parent 4332914 commit 532ce6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WoL/Services/RdpPortPingService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ private static async Task<bool> IsPortOpen(IPAddress ip, int port, TimeSpan time
return true;
}
catch (Exception ex)
when (ex is SocketException || ex is ObjectDisposedException)
when (ex is SocketException || ex is OperationCanceledException)
{
return false;
}
Expand Down

0 comments on commit 532ce6b

Please sign in to comment.