From 532ce6b70d709e1a8fbab0f92bd652794d256df5 Mon Sep 17 00:00:00 2001 From: Georg Jung Date: Tue, 19 May 2020 15:24:19 +0300 Subject: [PATCH] fix offline status wrong exception type catched so IsPortOpen would not return false as expected --- WoL/Services/RdpPortPingService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WoL/Services/RdpPortPingService.cs b/WoL/Services/RdpPortPingService.cs index 99e97c6..00d4af9 100644 --- a/WoL/Services/RdpPortPingService.cs +++ b/WoL/Services/RdpPortPingService.cs @@ -24,7 +24,7 @@ private static async Task 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; }