hypercore 11.0.41 → 11.0.42

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 (3) hide show
  1. package/index.js +3 -0
  2. package/lib/core.js +0 -1
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -295,6 +295,9 @@ class Hypercore extends EventEmitter {
295
295
  }
296
296
 
297
297
  this.emit('ready')
298
+
299
+ // if we are a weak session the core might have closed...
300
+ if (this.core.closing) this.close().catch(safetyCatch)
298
301
  }
299
302
 
300
303
  _removeSession () {
package/lib/core.js CHANGED
@@ -123,7 +123,6 @@ module.exports = class Core {
123
123
  }
124
124
 
125
125
  this.opened = true
126
- this.checkIfIdle()
127
126
  }
128
127
 
129
128
  async _tryOpen (opts) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore",
3
- "version": "11.0.41",
3
+ "version": "11.0.42",
4
4
  "description": "Hypercore is a secure, distributed append-only log",
5
5
  "main": "index.js",
6
6
  "scripts": {