faster disconnect for hosts
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 2m3s

This commit is contained in:
matst80
2024-11-12 07:38:49 +01:00
parent 6a90449859
commit 69dde41996

View File

@@ -313,6 +313,11 @@ func (p *SyncedPool) RequestOwnership(id CartId) error {
err := r.ConfirmChange(id, p.Hostname) err := r.ConfirmChange(id, p.Hostname)
all++ all++
if err != nil { if err != nil {
r.MissedPings++
if r.MissedPings > 3 {
p.RemoveHost(r)
return fmt.Errorf("remote grain change failed %v", err)
}
log.Printf("Error confirming change: %v from %s\n", err, p.Hostname) log.Printf("Error confirming change: %v from %s\n", err, p.Hostname)
continue continue
} }