fix: tcp ping timeout latency
parent
759a0f6159
commit
dfd78b9ca4
|
|
@ -37,6 +37,9 @@ export async function getStatus(
|
||||||
status.err = ''
|
status.err = ''
|
||||||
} catch (e: Error | any) {
|
} catch (e: Error | any) {
|
||||||
console.log(`${monitor.name} errored with ${e.name}: ${e.message}`)
|
console.log(`${monitor.name} errored with ${e.name}: ${e.message}`)
|
||||||
|
if (e.message.includes('timed out')) {
|
||||||
|
status.ping = monitor.timeout || 10000
|
||||||
|
}
|
||||||
status.up = false
|
status.up = false
|
||||||
status.err = e.name + ': ' + e.message
|
status.err = e.name + ': ' + e.message
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue