Add timeout.

This commit is contained in:
2025-10-28 20:06:08 +01:00
parent bf604a0edb
commit 856c23d9a9

View File

@@ -76,7 +76,7 @@ export default {
async function fetchAlive(host: {host: string, name: string, alive: boolean, type: 'ping' | 'website'}) {
if(host.type === 'ping'){
let res = await ping.promise.probe(host.host, {timeout: 3});
let res = await ping.promise.probe(host.host, {timeout: 5});
host.alive = res.alive;
}else if(host.type === 'website'){
try {