Merge pull request #70 from libp2p/fix/err-handling

fix error handling in UpdateAddrs: return on error
This commit is contained in:
Raúl Kripalani 2019-04-16 22:16:09 +01:00 committed by GitHub
commit ab02c26ae9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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