fix formatting cuz it was bugging me
Signed-off-by: si458 <simonsmith5521@gmail.com>
si458 committed
Feb 24, 2026 at 16:39 UTC
c5a2e7a000da9dfe22e2c2adda186480be1532ed
1 file changed
+12
-12
agents/meshcore.js
+12
-12
@@ -967,20 +967,20 @@ function getIpLocationDataEx(func) {
967
var options = http.parseUri(url);
968
options.method = 'GET';
969
http.request(options, function (resp) {
970
- var geoData = '';
970
+ var geoData = '';
971
resp.data = function (chunk) { geoData += chunk; };
972
resp.end = function () {
973
try {
974
- var result = JSON.parse(geoData);
975
- if (result.ip && result.loc) {
976
- getIpLocationDataExInProgress = false;
977
- getIpLocationDataExCounts[1]++;
978
- func(result);
979
- return;
974
+ var result = JSON.parse(geoData);
975
+ if (result.ip && result.loc) {
976
+ getIpLocationDataExInProgress = false;
977
+ getIpLocationDataExCounts[1]++;
978
+ func(result);
979
+ return;
980
}
981
} catch (ex) { }
982
- if (fallback) { fallback(); } else { done(null); }
983
- };
982
+ if (fallback) { fallback(); } else { done(null); }
983
+ };
984
if (resp.statusCode != 200) { if (fallback) { fallback(); } else { done(null); } }
985
}).on('error', function () {
986
if (fallback) { fallback(); } else { done(null); }
@@ -988,7 +988,7 @@ function getIpLocationDataEx(func) {
988
}
989
990
function done(result) {
991
- getIpLocationDataExInProgress = false;
991
+ getIpLocationDataExInProgress = false;
992
if (func) { func(result); }
993
}
994
@@ -996,7 +996,7 @@ function getIpLocationDataEx(func) {
996
tryEndpoint('https://ipinfo.io/json', null);
997
});
998
999
- return true;
999
+ return true;
1000
}
1001
1002
// Remove all Gateway MAC addresses for interface list. This is useful because the gateway MAC is not always populated reliably.
@@ -6373,7 +6373,7 @@ function sendPeriodicServerUpdate(flags, force) {
6373
try {
6374
require('win-deskutils').idle.getSecondsAllSessions().then(function (seconds) {
6375
meshCoreObj.idletime = seconds;
6376
- meshCoreObjChanged();
6376
+ meshCoreObjChanged();
6377
});
6378
} catch (ex) { sendConsoleText('Error getting idle time: ' + ex.toString());}
6379
}