Skip to content

Commit

Permalink
Increase load interval to 5 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
sulkaharo committed Nov 15, 2020
1 parent a9692d1 commit e7d080a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down

0 comments on commit e7d080a

Please sign in to comment.