diff --git a/synced-pool.go b/synced-pool.go index 83ed3fb..860de7c 100644 --- a/synced-pool.go +++ b/synced-pool.go @@ -335,8 +335,8 @@ func (p *SyncedPool) Negotiate() { } func (p *SyncedPool) GetHealthyRemotes() []*RemoteHost { - // p.mu.RLock() - // defer p.mu.RUnlock() + p.mu.RLock() + defer p.mu.RUnlock() remotes := make([]*RemoteHost, 0, len(p.remotes)) for _, r := range p.remotes { if r.IsHealthy() { @@ -351,10 +351,7 @@ func (p *SyncedPool) RequestOwnership(id CartId) error { all := 0 for _, r := range p.GetHealthyRemotes() { - if !r.IsHealthy() { - continue - } - //log.Printf("Asking for confirmation change of %s to %s (me) with %s\n", id, p.Hostname, r.Host) + err := r.ConfirmChange(id, p.Hostname) all++ if err != nil {