fix: create dial target for peer with no known addrs (#715)

This commit is contained in:
Vasco Santos
2020-07-20 14:54:03 +02:00
committed by GitHub
parent 3896941128
commit 7da9ad44ab
2 changed files with 10 additions and 1 deletions

View File

@@ -112,7 +112,7 @@ class Dialer {
this.peerStore.addressBook.add(id, multiaddrs)
}
let addrs = this.peerStore.addressBook.getMultiaddrsForPeer(id)
let addrs = this.peerStore.addressBook.getMultiaddrsForPeer(id) || []
// If received a multiaddr to dial, it should be the first to use
// But, if we know other multiaddrs for the peer, we should try them too.