homebrew: reset status on link failure

pull/1/head
Wijnand Modderman-Lenstra 9 years ago
parent 74cc42c1b8
commit e82c2b2e16

@ -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)

Loading…
Cancel
Save