added binding between ping model parameters and the new ping implementation

This commit is contained in:
filippolauria 2025-03-11 11:55:27 +01:00
parent 1b2b9d44c9
commit 7110c6d30e

View file

@ -635,7 +635,7 @@ class Monitor extends BeanModel {
bean.status = UP;
} else if (this.type === "ping") {
bean.ping = await ping(this.hostname, this.packetSize);
bean.ping = await ping(this.hostname, this.ping_count, "", this.ping_numeric, this.packetSize, this.ping_deadline, this.ping_timeout);
bean.msg = "";
bean.status = UP;
} else if (this.type === "push") { // Type: Push
@ -707,7 +707,7 @@ class Monitor extends BeanModel {
bean.msg = res.data.response.servers[0].name;
try {
bean.ping = await ping(this.hostname, this.packetSize);
bean.ping = await ping(this.hostname, PING_COUNT_DEFAULT, "", true, this.packetSize, PING_DEADLINE_DEFAULT, PING_TIMEOUT_DEFAULT);
} catch (_) { }
} else {
throw new Error("Server not found on Steam");