From e82c2b2e161d7c018f35bde3c315737a4c277851 Mon Sep 17 00:00:00 2001 From: Wijnand Modderman-Lenstra Date: Tue, 22 Dec 2015 12:32:18 +0100 Subject: [PATCH] homebrew: reset status on link failure --- homebrew/homebrew.go | 1 + 1 file changed, 1 insertion(+) diff --git a/homebrew/homebrew.go b/homebrew/homebrew.go index 04d10ba..479c8ac 100644 --- a/homebrew/homebrew.go +++ b/homebrew/homebrew.go @@ -552,6 +552,7 @@ func (h *Homebrew) keepalive(stop <-chan bool) { case AuthNone, AuthBegin: switch { case now.Sub(peer.Last.PacketReceived) > AuthTimeout: + peer.Status = AuthNone log.Errorf("peer %d@%s not responding to login; retrying\n", peer.ID, peer.Addr) if err := h.handleAuth(peer); err != nil { log.Errorf("peer %d@%s retry failed: %v\n", peer.ID, peer.Addr, err)