From 662be3b0a431b5300ccf91f181b25cd00d49e8f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Kripalani?= Date: Tue, 16 Apr 2019 22:11:14 +0100 Subject: [PATCH] fix error handling: return on err. --- pstoreds/addr_book.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pstoreds/addr_book.go b/pstoreds/addr_book.go index faef34b..0eacacf 100644 --- a/pstoreds/addr_book.go +++ b/pstoreds/addr_book.go @@ -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()