Skip to content
This repository was archived by the owner on Aug 19, 2022. It is now read-only.

Commit ab02c26

Browse files
authored
Merge pull request #70 from libp2p/fix/err-handling
fix error handling in UpdateAddrs: return on error
2 parents deb2163 + 662be3b commit ab02c26

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pstoreds/addr_book.go

+1
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ func (ab *dsAddrBook) UpdateAddrs(p peer.ID, oldTTL time.Duration, newTTL time.D
264264
pr, err := ab.loadRecord(p, true, false)
265265
if err != nil {
266266
log.Errorf("failed to update ttls for peer %s: %s\n", p.Pretty(), err)
267+
return
267268
}
268269

269270
pr.Lock()

0 commit comments

Comments
 (0)