This commit is contained in:
@@ -85,10 +85,7 @@ func (p *SyncedPool) NegotiateHandler(data []byte) (uint32, []byte, error) {
|
|||||||
negotiationCount.Inc()
|
negotiationCount.Inc()
|
||||||
log.Printf("Handling negotiation\n")
|
log.Printf("Handling negotiation\n")
|
||||||
for _, host := range p.ExcludeKnown(strings.Split(string(data), ";")) {
|
for _, host := range p.ExcludeKnown(strings.Split(string(data), ";")) {
|
||||||
err := p.AddRemote(host)
|
p.AddRemote(host)
|
||||||
if err != nil {
|
|
||||||
log.Printf("Error adding remote %s: %v\n", host, err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return RemoteNegotiateResponse, []byte("ok"), nil
|
return RemoteNegotiateResponse, []byte("ok"), nil
|
||||||
@@ -169,10 +166,7 @@ func NewSyncedPool(local *GrainLocalPool, hostname string, discovery Discovery)
|
|||||||
go func(h string) {
|
go func(h string) {
|
||||||
log.Printf("Discovered host %s, waiting for startup", h)
|
log.Printf("Discovered host %s, waiting for startup", h)
|
||||||
time.Sleep(time.Second)
|
time.Sleep(time.Second)
|
||||||
err := pool.AddRemote(h)
|
pool.AddRemote(h)
|
||||||
if err != nil {
|
|
||||||
log.Printf("Error adding remote %s: %v", h, err)
|
|
||||||
}
|
|
||||||
}(chng.Host)
|
}(chng.Host)
|
||||||
} else if chng.Type == watch.Deleted && known {
|
} else if chng.Type == watch.Deleted && known {
|
||||||
log.Printf("Host removed %s, removing from index", chng.Host)
|
log.Printf("Host removed %s, removing from index", chng.Host)
|
||||||
|
|||||||
Reference in New Issue
Block a user