run on x86 for a while
This commit is contained in:
@@ -13,11 +13,11 @@ type RemoteHost struct {
|
||||
}
|
||||
|
||||
func (h *RemoteHost) IsHealthy() bool {
|
||||
return !h.Dead && h.MissedPings < 3
|
||||
return !h.PersistentConnection.Dead && h.MissedPings < 3
|
||||
}
|
||||
|
||||
func (h *RemoteHost) Initialize(p *SyncedPool) {
|
||||
|
||||
log.Printf("Initializing remote %s\n", h.Host)
|
||||
ids, err := h.GetCartMappings()
|
||||
if err != nil {
|
||||
log.Printf("Error getting remote mappings: %v\n", err)
|
||||
@@ -43,8 +43,9 @@ func (h *RemoteHost) Ping() error {
|
||||
if err != nil {
|
||||
h.MissedPings++
|
||||
log.Printf("Error pinging remote %s, missed pings: %d", h.Host, h.MissedPings)
|
||||
if h.MissedPings >= 3 {
|
||||
if !h.IsHealthy() {
|
||||
h.Close()
|
||||
return fmt.Errorf("remote %s is dead", h.Host)
|
||||
}
|
||||
} else {
|
||||
h.MissedPings = 0
|
||||
|
||||
Reference in New Issue
Block a user