use fraction of interval for timeout

This commit is contained in:
Jacques ROUSSEL 2025-04-13 18:47:44 +02:00
parent 1cb5a52e7b
commit a1bfc21ef4

View File

@ -45,7 +45,7 @@ class TCPMonitorType extends MonitorType {
reject(error);
});
socket.setTimeout(10000, () => {
socket.setTimeout(monitor.interval * 1000 * 0.8, () => {
reject(new Error("Connection timed out"));
});
});