hypercore 10.37.23 → 10.37.24

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
@@ -2327,9 +2327,10 @@ module.exports = class Replicator {
2327
2327
  clearTimeout(this._downloadingTimer)
2328
2328
  this._downloadingTimer = null
2329
2329
  }
2330
- for (const peer of this.peers) {
2330
+ while (this.peers.length) {
2331
+ const peer = this.peers[this.peers.length - 1]
2331
2332
  this.detachFrom(peer.protomux)
2332
- peer.channel.close()
2333
+ peer.channel.close() // peer is removed from array in onclose
2333
2334
  }
2334
2335
  for (const protomux of this._attached) {
2335
2336
  this.detachFrom(protomux)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore",
3
- "version": "10.37.23",
3
+ "version": "10.37.24",
4
4
  "description": "Hypercore is a secure, distributed append-only log",
5
5
  "main": "index.js",
6
6
  "scripts": {