mirror of
https://github.com/libp2p/go-libp2p-peerstore.git
synced 2025-01-30 05:10:08 +08:00
fix error handling: return on err.
This commit is contained in:
parent
deb2163a68
commit
662be3b0a4
@ -264,6 +264,7 @@ func (ab *dsAddrBook) UpdateAddrs(p peer.ID, oldTTL time.Duration, newTTL time.D
|
||||
pr, err := ab.loadRecord(p, true, false)
|
||||
if err != nil {
|
||||
log.Errorf("failed to update ttls for peer %s: %s\n", p.Pretty(), err)
|
||||
return
|
||||
}
|
||||
|
||||
pr.Lock()
|
||||
|
Loading…
Reference in New Issue
Block a user