From 4b60d648b65b499542ae9e9f2df8ea4960e354ad Mon Sep 17 00:00:00 2001 From: Lightemerald Date: Sun, 25 Jun 2023 14:22:17 +0200 Subject: [PATCH] test --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index a17ead8..f886769 100644 --- a/index.js +++ b/index.js @@ -85,12 +85,13 @@ async function vpnConnect(vpnName) { } } catch (error) { - consoleLog(`[${host}] Failed to connect to VPN: ${vpnName}. Retrying (attempt ${attempt} of ${maxAttempts})...`, 'error'); + consoleLog(`[${host}] Catch error: Failed to connect to VPN: ${vpnName}. Retrying (attempt ${attempt} of ${maxAttempts})...`, 'error'); await sleep(1000); } } consoleLog(`[${host}] Maximum number of connection attempts reached. Failed to connect to VPN: ${vpnName}`, 'error'); + await vpnDisconnect(); return 1; }