hypercore 10.37.6 → 10.37.7

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/replicator.js CHANGED
@@ -759,7 +759,10 @@ class Peer {
759
759
 
760
760
  this.inflight--
761
761
  this.replicator._requestDone(req.id, false)
762
+
763
+ // clear inflight state
762
764
  if (isBlockRequest(req)) this.replicator._unmarkInflight(req.block.index)
765
+ if (isUpgradeRequest(req)) this.replicator._clearInflightUpgrade(req)
763
766
 
764
767
  if (this.roundtripQueue === null) this.roundtripQueue = new RoundtripQueue()
765
768
  this.roundtripQueue.add(req.id)
@@ -2412,3 +2415,7 @@ function setDownloadingLater (repl, downloading, session) {
2412
2415
  function isBlockRequest (req) {
2413
2416
  return req !== null && req.block !== null
2414
2417
  }
2418
+
2419
+ function isUpgradeRequest (req) {
2420
+ return req !== null && req.upgrade !== null
2421
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore",
3
- "version": "10.37.6",
3
+ "version": "10.37.7",
4
4
  "description": "Hypercore is a secure, distributed append-only log",
5
5
  "main": "index.js",
6
6
  "scripts": {