We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab028a2 commit e71e2b6Copy full SHA for e71e2b6
package.json
@@ -72,7 +72,7 @@
72
"libp2p-circuit": "~0.3.0",
73
"libp2p-delegated-content-routing": "~0.2.2",
74
"libp2p-delegated-peer-routing": "~0.2.2",
75
- "libp2p-kad-dht": "~0.14.2",
+ "libp2p-kad-dht": "~0.14.5",
76
"libp2p-mdns": "~0.12.0",
77
"libp2p-mplex": "~0.8.4",
78
"libp2p-secio": "~0.11.0",
src/index.js
@@ -404,7 +404,10 @@ class Node extends EventEmitter {
404
// have to set started here because DHT requires libp2p is already started
405
this._isStarted = true
406
if (this._dht) {
407
- this._dht.start(cb)
+ this._dht.start(() => {
408
+ this._dht.on('peer', (peerInfo) => this.emit('peer:discovery', peerInfo))
409
+ cb()
410
+ })
411
} else {
412
cb()
413
}
0 commit comments