corestore 6.18.1 → 6.18.2

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.
Files changed (2) hide show
  1. package/index.js +3 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -454,11 +454,14 @@ module.exports = class Corestore extends ReadyResource {
454
454
  })
455
455
 
456
456
  if (!this.passive) {
457
+ const muxer = stream.noiseStream.userData
458
+ muxer.cork()
457
459
  for (const core of this.cores.values()) {
458
460
  // If the core is not opened, it will be replicated in preload.
459
461
  if (!core.opened || core.closing || !core.replicator.downloading) continue
460
462
  core.replicate(stream, { session: true })
461
463
  }
464
+ stream.noiseStream.opened.then(() => muxer.uncork())
462
465
  }
463
466
 
464
467
  const streamRecord = { stream, isExternal }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "corestore",
3
- "version": "6.18.1",
3
+ "version": "6.18.2",
4
4
  "description": "A Hypercore factory that simplifies managing collections of cores.",
5
5
  "main": "index.js",
6
6
  "scripts": {