From ea1b247d3fad9587ee9f71ff8831e14e3d6854c6 Mon Sep 17 00:00:00 2001 From: Cameron Diver Date: Thu, 7 Mar 2019 17:52:20 +0000 Subject: [PATCH] fix: Fix connectivity active VPN check During the conversion to typescript, the VPN active check was being performed on the directory, and not the file that the VPN creates, meaning it would always return true (as we explicitly create the directory on startup if it does not exist). Change-type: patch Signed-off-by: Cameron Diver --- src/network.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network.ts b/src/network.ts index 82248e5f..3825305d 100644 --- a/src/network.ts +++ b/src/network.ts @@ -42,7 +42,7 @@ export function enableCheck(enable: boolean) { async function vpnStatusInotifyCallback(): Promise { try { - await fs.lstat(constants.vpnStatusPath); + await fs.lstat(`${constants.vpnStatusPath}/active`); isConnectivityCheckPaused = true; } catch { isConnectivityCheckPaused = false;