From 1598c2855c96d79606ca4034ff5f86e68d0dcd56 Mon Sep 17 00:00:00 2001 From: lucas_nz <606314+lucasnz@users.noreply.github.com> Date: Sun, 15 Oct 2023 09:07:34 +1300 Subject: [PATCH] Rename variables and avoid merge conflict --- server/model/monitor.js | 10 +++++----- server/server.js | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index 01e9e4ae4..7e5495330 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -348,13 +348,13 @@ class Monitor extends BeanModel { } try { - let hostname = this.hostname; + let HostnameOrIp = this.hostname; if (this.type === "ping" || this.type === "port" ) { try { - hostname = await lookup(this.hostname, this.ipFamily); + HostnameOrIp = await lookup(this.hostname, this.ipFamily); } catch (err) { log.debug("monitor", err); - hostname = null; + HostnameOrIp = null; } } @@ -587,12 +587,12 @@ class Monitor extends BeanModel { } } else if (this.type === "port") { - bean.ping = await tcping(hostname, this.port); + bean.ping = await tcping(HostnameOrIp, this.port); bean.msg = ""; bean.status = UP; } else if (this.type === "ping") { - bean.ping = await ping(hostname, this.packetSize); + bean.ping = await ping(HostnameOrIp, this.packetSize); bean.msg = ""; bean.status = UP; } else if (this.type === "push") { // Type: Push diff --git a/server/server.js b/server/server.js index 9be8e2ad8..a30d9e86e 100644 --- a/server/server.js +++ b/server/server.js @@ -1559,7 +1559,6 @@ let needSetup = false; dns_resolve_server: monitorListData[i].dns_resolve_server, notificationIDList: monitorListData[i].notificationIDList, proxy_id: monitorListData[i].proxy_id || null, - ipFamily: monitorListData[i].ipFamily, }; if (monitorListData[i].pushToken) {