hypercore 10.37.20 → 10.37.21

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 +2 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -273,9 +273,9 @@ module.exports = class Hypercore extends EventEmitter {
273
273
 
274
274
  setActive (bool) {
275
275
  const active = !!bool
276
- if (active === this._active) return
276
+ if (active === this._active || this.closing) return
277
277
  this._active = active
278
- if (!this.opened || this.closing) return
278
+ if (!this.opened) return
279
279
  this.replicator.updateActivity(this._active ? 1 : -1)
280
280
  }
281
281
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore",
3
- "version": "10.37.20",
3
+ "version": "10.37.21",
4
4
  "description": "Hypercore is a secure, distributed append-only log",
5
5
  "main": "index.js",
6
6
  "scripts": {