Browse Source

log error from AddrBook#AddAddress in DialPeersAsync

Refs #1434
pull/1453/head
Anton Kaliaev 7 years ago
parent
commit
3a0edc561d
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      p2p/switch.go

+ 3
- 1
p2p/switch.go View File

@ -359,7 +359,9 @@ func (sw *Switch) DialPeersAsync(addrBook AddrBook, peers []string, persistent b
for _, netAddr := range netAddrs { for _, netAddr := range netAddrs {
// do not add our address or ID // do not add our address or ID
if !netAddr.Same(ourAddr) { if !netAddr.Same(ourAddr) {
addrBook.AddAddress(netAddr, ourAddr)
if err := addrBook.AddAddress(netAddr, ourAddr); err != nil {
sw.Logger.Error("Can't add peer's address to addrbook", "err", err)
}
} }
} }
// Persist some peers to disk right away. // Persist some peers to disk right away.


Loading…
Cancel
Save