fix error handling: return on err.

This commit is contained in:
Raúl Kripalani 2019-04-16 22:11:14 +01:00
parent deb2163a68
commit 662be3b0a4

View File

@ -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()