This commit is contained in:
@@ -97,11 +97,30 @@ func NewSyncedPool(local *GrainLocalPool, hostname string, d Discovery) (*Synced
|
||||
continue
|
||||
}
|
||||
log.Printf("Discovered host %s\n", h)
|
||||
|
||||
err := pool.AddRemote(h)
|
||||
if err != nil {
|
||||
log.Printf("Error adding remote %s: %v\n", h, err)
|
||||
}
|
||||
}
|
||||
otherHosts, err := pool.Negotiate(hosts)
|
||||
if err != nil {
|
||||
log.Printf("Error negotiating: %v\n", err)
|
||||
}
|
||||
for _, h := range otherHosts {
|
||||
if h == hostname {
|
||||
continue
|
||||
}
|
||||
for _, r := range pool.remotes {
|
||||
if r.Host == h {
|
||||
continue
|
||||
}
|
||||
}
|
||||
err := pool.AddRemote(h)
|
||||
if err != nil {
|
||||
log.Printf("Error adding undiscovered remote %s: %v\n", h, err)
|
||||
}
|
||||
}
|
||||
}()
|
||||
}
|
||||
go func() {
|
||||
|
||||
Reference in New Issue
Block a user