Skip to content

Commit

Permalink
Merge pull request #70 from libp2p/fix/err-handling
Browse files Browse the repository at this point in the history
fix error handling in UpdateAddrs: return on error
  • Loading branch information
raulk authored Apr 16, 2019
2 parents 50176ec + 6d47278 commit c14eeb5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions p2p/host/peerstore/pstoreds/addr_book.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit c14eeb5

Please sign in to comment.