corestore 7.0.18 → 7.0.20

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 +5 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -175,6 +175,7 @@ class CoreTracker {
175
175
  _startGC () {
176
176
  if (this._gcInterval) return
177
177
  this._gcInterval = setInterval(this._gcCycleBound, 2000)
178
+ this._gcInterval.unref()
178
179
  }
179
180
 
180
181
  close () {
@@ -182,7 +183,10 @@ class CoreTracker {
182
183
  this._gcing.clear()
183
184
 
184
185
  const all = []
185
- for (const core of this.map.values()) all.push(core.close())
186
+ for (const core of this.map.values()) {
187
+ core.onidle = noop // no reentry
188
+ all.push(core.close())
189
+ }
186
190
  this.map.clear()
187
191
 
188
192
  return Promise.all(all)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "corestore",
3
- "version": "7.0.18",
3
+ "version": "7.0.20",
4
4
  "description": "A Hypercore factory that simplifies managing collections of cores.",
5
5
  "main": "index.js",
6
6
  "files": [