add a catch to a fetch for better server stablity

This commit is contained in:
MathMan05
2024-09-04 11:25:26 -05:00
parent aa2044f496
commit 9aa51d65fd

View File

@@ -42,6 +42,11 @@ async function observe(instances){
function check(){
fetch(api+"ping",{method: "HEAD"}).then(_=>{
setStatus(instance,_.ok);
}).catch(_=>{
console.log("Ping errored");
setTimeout(1000*60,_=>{
check();
})
});
}
setTimeout(