use fraction of interval for timeout

This commit is contained in:
Jacques ROUSSEL 2025-04-13 18:47:44 +02:00
parent 8646f287ff
commit ec7d0edc95

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"));
});
});