mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-05-07 08:22:13 +00:00
fix: await peer discovery start in libp2p start (#600)
This commit is contained in:
parent
da83721d6d
commit
bd7fd0f755
@ -399,7 +399,7 @@ class Libp2p extends EventEmitter {
|
||||
* Called when libp2p has started and before it returns
|
||||
* @private
|
||||
*/
|
||||
_onDidStart () {
|
||||
async _onDidStart () {
|
||||
this._isStarted = true
|
||||
|
||||
this.connectionManager.start()
|
||||
@ -410,7 +410,7 @@ class Libp2p extends EventEmitter {
|
||||
})
|
||||
|
||||
// Peer discovery
|
||||
this._setupPeerDiscovery()
|
||||
await this._setupPeerDiscovery()
|
||||
|
||||
// Once we start, emit and dial any peers we may have already discovered
|
||||
for (const peerInfo of this.peerStore.peers.values()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user