diff --git a/addrmanager.go b/addrmanager.go index f8bbcbb1..03dfc9f7 100644 --- a/addrmanager.go +++ b/addrmanager.go @@ -466,6 +466,7 @@ func (a *AddrManager) savePeers() { w, err := os.Create(filePath) if err != nil { log.Error("Error opening file: ", filePath, err) + return } enc := json.NewEncoder(w) defer w.Close()