From 04a7681789ad9c6b4849089b66da94022e5815ad Mon Sep 17 00:00:00 2001 From: Guillaume Leroi Date: Fri, 21 Oct 2016 14:48:21 +0200 Subject: [PATCH] AccessPoint.IsConnected: report IsConnected if current network has same profileName and isState is Connected --- SimpleWifi/AccessPoint.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SimpleWifi/AccessPoint.cs b/SimpleWifi/AccessPoint.cs index c1d10ae..1bdc99d 100644 --- a/SimpleWifi/AccessPoint.cs +++ b/SimpleWifi/AccessPoint.cs @@ -70,7 +70,7 @@ public bool IsConnected try { var a = _interface.CurrentConnection; // This prop throws exception if not connected, which forces me to this try catch. Refactor plix. - return a.profileName == _network.profileName; + return a.profileName == _network.profileName && a.isState == WlanInterfaceState.Connected; } catch {