corestore 6.15.9 → 6.15.11
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 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -38,6 +38,7 @@ module.exports = class Corestore extends ReadyResource {
|
|
|
38
38
|
this._overwrite = opts.overwrite === true
|
|
39
39
|
this._readonly = opts.writable === false
|
|
40
40
|
this._attached = opts._attached || null
|
|
41
|
+
this._notDownloadingLinger = opts.notDownloadingLinger
|
|
41
42
|
|
|
42
43
|
this._sessions = new Set() // sessions for THIS namespace
|
|
43
44
|
this._rootStoreSessions = new Set()
|
|
@@ -256,7 +257,7 @@ module.exports = class Corestore extends ReadyResource {
|
|
|
256
257
|
|
|
257
258
|
while (this.cores.has(id)) {
|
|
258
259
|
const existing = this.cores.get(id)
|
|
259
|
-
if (existing.opened && !existing.closing) return { from: existing, keyPair, manifest }
|
|
260
|
+
if (existing.opened && !existing.closing) return { from: existing, keyPair, manifest, cache: !!opts.cache }
|
|
260
261
|
if (existing.closing) {
|
|
261
262
|
await existing.close()
|
|
262
263
|
} else {
|
|
@@ -276,6 +277,7 @@ module.exports = class Corestore extends ReadyResource {
|
|
|
276
277
|
const storageRoot = [CORES_DIR, id.slice(0, 2), id.slice(2, 4), id].join('/')
|
|
277
278
|
const core = new Hypercore(p => this.storage(storageRoot + '/' + p), {
|
|
278
279
|
_preready: this._preready.bind(this),
|
|
280
|
+
notDownloadingLinger: this._notDownloadingLinger,
|
|
279
281
|
autoClose: true,
|
|
280
282
|
active: false,
|
|
281
283
|
encryptionKey: opts.encryptionKey || null,
|