mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-05-24 23:52:35 +02:00
use fraction of interval for timeout
This commit is contained in:
parent
8646f287ff
commit
ec7d0edc95
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ class TCPMonitorType extends MonitorType {
|
||||||
reject(error);
|
reject(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.setTimeout(10000, () => {
|
socket.setTimeout(monitor.interval * 1000 * 0.8, () => {
|
||||||
reject(new Error("Connection timed out"));
|
reject(new Error("Connection timed out"));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue