From 1c6bb35d58f84d0167772d270076f8eb6880eeb9 Mon Sep 17 00:00:00 2001 From: Joe Uhren Date: Tue, 27 Jun 2023 21:13:53 -0600 Subject: [PATCH] Fix error in peer sync when node has no port --- scripts/sync.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/sync.js b/scripts/sync.js index 6c45621..f29a190 100644 --- a/scripts/sync.js +++ b/scripts/sync.js @@ -1455,7 +1455,7 @@ if (lib.is_locked([database]) == false) { country: peer.country, country_code: peer.country_code }, function() { - console.log('Updated peer %s:%s [%s/%s]', address, port.toString(), (i + 1).toString(), body.length.toString()); + console.log('Updated peer %s%s [%s/%s]', address, (port == null || port == '' ? '' : ':' + port.toString()), (i + 1).toString(), body.length.toString()); // check if the script is stopping if (stopSync) { @@ -1489,7 +1489,7 @@ if (lib.is_locked([database]) == false) { country: geo.country_name, country_code: geo.country_code }, function() { - console.log('Added new peer %s:%s [%s/%s]', address, port.toString(), (i + 1).toString(), body.length.toString()); + console.log('Added new peer %s%s [%s/%s]', address, (port == null || port == '' ? '' : ':' + port.toString()), (i + 1).toString(), body.length.toString()); // check if the script is stopping if (stopSync) {