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.
- package/index.js +3 -0
- 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 }
|