querysub 0.78.0 → 0.80.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -204,6 +204,8 @@ async function checkEdgeDomainsAlive() {
|
|
|
204
204
|
for (let i = 0; i < 3; i++) {
|
|
205
205
|
let isListening = await testTCPIsListening(ip, publicPort);
|
|
206
206
|
if (isListening) return true;
|
|
207
|
+
console.warn(`IP ${ip}:${publicPort} is not listening, waiting 10 seconds before retrying. If it fails 3 times in a row, the A record will be removed.`);
|
|
208
|
+
await delay(timeInSecond * 10);
|
|
207
209
|
}
|
|
208
210
|
return false;
|
|
209
211
|
}));
|
|
@@ -269,7 +271,7 @@ async function getHTTPSKeyCertInner(callerIP: string) {
|
|
|
269
271
|
promises.push(deleteRecord("A", edgeDomain, "127.0.0.1"));
|
|
270
272
|
}
|
|
271
273
|
promises.push(addRecord("A", edgeDomain, callerIP));
|
|
272
|
-
runInfinitePoll(timeInMinute *
|
|
274
|
+
runInfinitePoll(timeInMinute * 1, async () => {
|
|
273
275
|
let ips = await getRecords("A", edgeDomain);
|
|
274
276
|
if (!ips.includes(callerIP)) {
|
|
275
277
|
console.error(`Our A record for ${edgeDomain} is no longer pointing to our ip (${callerIP}, as it is now pointing to ${JSON.stringify(ips)}). Terminating, hopefully when we restart we will fix it. This SHOULDN'T happen often!`);
|
|
@@ -457,7 +457,9 @@ if (isServer()) {
|
|
|
457
457
|
// when using management tools to scan the DB (otherwise the entire DB has to go through
|
|
458
458
|
// our router, which can easily cap it at 15MB/s, because rogers is terrible).
|
|
459
459
|
// - Only if isNoNetwork, otherwise it causes unnecessary lag.
|
|
460
|
+
let time = Date.now();
|
|
460
461
|
let isNoNetwork = await NodeDiscoveryController.nodes[browserNodeId].isNoNetwork();
|
|
462
|
+
console.log(magenta(`isNoNetwork took ${Date.now() - time}ms`));
|
|
461
463
|
if (isNoNetwork && !location.search.includes("nolocalhost")) {
|
|
462
464
|
let url = new URL("https://" + browserNodeId);
|
|
463
465
|
url.hostname = "127-0-0-1." + url.hostname;
|