From 7609909e6dc61396ca655c538f2bae1b8d2edc40 Mon Sep 17 00:00:00 2001 From: sawka Date: Thu, 30 Mar 2023 00:07:56 -0700 Subject: [PATCH] fix timeout array --- src/webshare-ws.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/webshare-ws.ts b/src/webshare-ws.ts index b97c382d..bee0a7ef 100644 --- a/src/webshare-ws.ts +++ b/src/webshare-ws.ts @@ -72,8 +72,8 @@ class WebShareWSControl { this.log("cannot connect, giving up"); return; } - let timeoutArr = [0, 5, 5, 15, 30, 60, 300, 3600]; - let timeout = 60; + let timeoutArr = [0, 0, 5, 5, 15, 30, 60, 300, 3600]; + let timeout = timeoutArr[timeoutArr.length-1]; if (this.reconnectTimes < timeoutArr.length) { timeout = timeoutArr[this.reconnectTimes]; }