blind-peer 2.7.12 → 2.7.13

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 -3
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -239,13 +239,12 @@ class BlindPeer extends ReadyResource {
239
239
 
240
240
  const stream = muxer.stream
241
241
  const handler = new WakeupHandler(this.db, auth.key, discoveryKey)
242
- const w = this.wakeup.session(auth.key, handler)
243
242
 
244
- if (w.getPeer(stream)) {
245
- w.destroy()
243
+ if (this.wakeup.hasStream(stream, auth.key, handler)) {
246
244
  return
247
245
  }
248
246
 
247
+ const w = this.wakeup.session(auth.key, handler)
249
248
  w.addStream(stream)
250
249
 
251
250
  for (const peer of w.peers) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blind-peer",
3
- "version": "2.7.12",
3
+ "version": "2.7.13",
4
4
  "description": "Blind peers help keep hypercores available",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -24,7 +24,7 @@
24
24
  "paparam": "^1.8.0",
25
25
  "pino": "^9.6.0",
26
26
  "protomux-rpc": "^1.7.1",
27
- "protomux-wakeup": "^2.2.0",
27
+ "protomux-wakeup": "^2.6.0",
28
28
  "ready-resource": "^1.1.2",
29
29
  "repl-swarm": "^2.3.0",
30
30
  "rocksdb-native": "^3.1.6",