querysub 0.78.0 → 0.79.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "querysub",
3
- "version": "0.78.0",
3
+ "version": "0.79.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",
@@ -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`);
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 * 5, async () => {
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!`);