diff --git a/static-data/www/shared/main/apicheck.js b/static-data/www/shared/main/apicheck.js index 323d4a21..b61f3f41 100644 --- a/static-data/www/shared/main/apicheck.js +++ b/static-data/www/shared/main/apicheck.js @@ -17,10 +17,17 @@ along with this program. If not, see */ apiOnline = true +lastMessageShown = new Date() +everShown = false async function doPing(){ out = setTimeout(function(){ + if (everShown && new Date() - lastMessageShown < 90000){ + return + } + everShown = true if (apiOnline){ - PNotify.notice('Connection lost with API server') + lastMessageShown = new Date() + PNotify.notice('Connection lost with API server') } apiOnline = false }, 10000)