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 <cameron@balena.io>
This commit is contained in:
Cameron Diver 2019-03-07 17:52:20 +00:00
parent 6f79702099
commit ea1b247d3f
No known key found for this signature in database
GPG Key ID: 49690ED87032539F

View File

@ -42,7 +42,7 @@ export function enableCheck(enable: boolean) {
async function vpnStatusInotifyCallback(): Promise<void> {
try {
await fs.lstat(constants.vpnStatusPath);
await fs.lstat(`${constants.vpnStatusPath}/active`);
isConnectivityCheckPaused = true;
} catch {
isConnectivityCheckPaused = false;