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.
- package/index.js +5 -1
- 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())
|
|
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)
|