hypercore 10.21.2 → 10.21.3
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/lib/core.js +3 -0
- package/package.json +1 -1
package/lib/core.js
CHANGED
|
@@ -26,6 +26,7 @@ module.exports = class Core {
|
|
|
26
26
|
this.bitfield = bitfield
|
|
27
27
|
this.defaultAuth = auth
|
|
28
28
|
this.truncating = 0
|
|
29
|
+
this.updating = false
|
|
29
30
|
this.closed = false
|
|
30
31
|
|
|
31
32
|
this._manifestFlushed = !!header.manifest
|
|
@@ -477,6 +478,7 @@ module.exports = class Core {
|
|
|
477
478
|
|
|
478
479
|
try {
|
|
479
480
|
if (!batch.commitable()) return false
|
|
481
|
+
this.updating = true
|
|
480
482
|
|
|
481
483
|
const entry = {
|
|
482
484
|
userData: null,
|
|
@@ -508,6 +510,7 @@ module.exports = class Core {
|
|
|
508
510
|
|
|
509
511
|
if (this._shouldFlush()) await this._flushOplog()
|
|
510
512
|
} finally {
|
|
513
|
+
this.updating = false
|
|
511
514
|
this._mutex.unlock()
|
|
512
515
|
}
|
|
513
516
|
|