Fix port NaN not working in MariaDB

This commit is contained in:
Louis Lam 2023-02-12 15:14:41 +08:00
parent b2a1bd5214
commit 5388a37a26

View file

@ -714,6 +714,11 @@ let needSetup = false;
bean.game = monitor.game; bean.game = monitor.game;
bean.maxretries = monitor.maxretries; bean.maxretries = monitor.maxretries;
bean.port = parseInt(monitor.port); bean.port = parseInt(monitor.port);
if (isNaN(bean.port)) {
bean.port = null;
}
bean.keyword = monitor.keyword; bean.keyword = monitor.keyword;
bean.ignoreTls = monitor.ignoreTls; bean.ignoreTls = monitor.ignoreTls;
bean.expiryNotification = monitor.expiryNotification; bean.expiryNotification = monitor.expiryNotification;