querysub 0.629.0 → 0.631.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.629.0",
3
+ "version": "0.631.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",
@@ -79,7 +79,7 @@
79
79
  "node-forge": "https://github.com/sliftist/forge#e618181b469b07bdc70b968b0391beb8ef5fecd6",
80
80
  "pako": "^2.1.0",
81
81
  "peggy": "^5.0.6",
82
- "sliftutils": "^1.7.97",
82
+ "sliftutils": "^1.7.99",
83
83
  "socket-function": "^1.2.30",
84
84
  "terser": "^5.31.0",
85
85
  "typenode": "^6.6.1",
@@ -83,7 +83,7 @@ function archiveBuilder(bucket: string, overrides: Partial<RemoteConfigBase>) {
83
83
  ]);
84
84
 
85
85
  return createArchives({
86
- version: 26,
86
+ version: 27,
87
87
  sources,
88
88
  });
89
89
  }
@@ -532,7 +532,8 @@ async function runServerSyncLoops() {
532
532
 
533
533
  console.log(magenta(`Node discovery is loaded`));
534
534
 
535
- await runInfinitePollCallAtStart(HEARTBEAT_INTERVAL, async function nodeDiscoverHeartbeat() {
535
+ // Delayed by a bit as it might take a little bit for our heartbeat to show up on startup, especially if we are the storage node that is supposed to store our own heartbeat.
536
+ delay(HEARTBEAT_INTERVAL * 5).then(() => runInfinitePoll(HEARTBEAT_INTERVAL, async function nodeDiscoverHeartbeat() {
536
537
  // If we waited too long, other nodes might think we are dead. In which case, we SHOULD terminate.
537
538
  if (!isNoNetwork()) {
538
539
  // FIRST, verify we didn't delay too long (to make sure we kill any nodes that were disconnected
@@ -557,7 +558,7 @@ async function runServerSyncLoops() {
557
558
  }
558
559
 
559
560
  await writeHeartbeat();
560
- });
561
+ }));
561
562
  }
562
563
 
563
564
  let discoveryReady = new PromiseObj<void>();