From e7d080adf8d9c34499ed7a5cbcbab37e12dead78 Mon Sep 17 00:00:00 2001 From: Sulka Haro Date: Sun, 15 Nov 2020 10:46:35 +0200 Subject: [PATCH] Increase load interval to 5 seconds --- lib/client/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/client/index.js b/lib/client/index.js index aeb40642e2d..53515e3b943 100644 --- a/lib/client/index.js +++ b/lib/client/index.js @@ -64,8 +64,8 @@ client.init = function init (callback) { }).done(function success (serverSettings) { if (serverSettings.runtimeState !== 'loaded') { console.log('Server is still loading data'); - $('#loadingMessageText').html('Server is loading data, retrying load in 2 seconds'); - window.setTimeout(window.Nightscout.client.init(), 2000); + $('#loadingMessageText').html('Server is starting and still loading data, retrying load in 5 seconds'); + window.setTimeout(window.Nightscout.client.init(), 5000); return; } client.settingsFailed = false; @@ -77,8 +77,8 @@ client.init = function init (callback) { // check if we couldn't reach the server at all, show offline message if (!jqXHR.readyState) { console.log('Application appears to be OFFLINE'); - $('#loadingMessageText').html('Connecting to Nightscout server failed, retrying every 2 seconds'); - window.setTimeout(window.Nightscout.client.init(), 2000); + $('#loadingMessageText').html('Connecting to Nightscout server failed, retrying every 5 seconds'); + window.setTimeout(window.Nightscout.client.init(), 5000); return; }