This commit is contained in:
@@ -83,7 +83,7 @@ func (p *SyncedPool) NegotiateHandler(data []byte) (uint32, []byte, error) {
|
||||
negotiationCount.Inc()
|
||||
log.Printf("Handling negotiation\n")
|
||||
for _, host := range p.ExcludeKnown(strings.Split(string(data), ";")) {
|
||||
p.AddRemote(host)
|
||||
go p.AddRemote(host)
|
||||
}
|
||||
|
||||
return RemoteNegotiateResponse, []byte("ok"), nil
|
||||
@@ -111,14 +111,14 @@ func (p *SyncedPool) GrainOwnerChangeHandler(data []byte) (uint32, []byte, error
|
||||
grain, err := NewRemoteGrain(id, r.Host)
|
||||
if err != nil {
|
||||
log.Printf("Owner change failed %s: %v\n", id, err)
|
||||
return AckChange, []byte("error"), nil
|
||||
return AckChange, []byte("error"), err
|
||||
}
|
||||
p.remoteIndex[id] = grain
|
||||
p.mu.Unlock()
|
||||
return AckChange, []byte("ok"), nil
|
||||
}
|
||||
}
|
||||
return AckChange, []byte("not found"), nil
|
||||
return AckChange, []byte{}, fmt.Errorf("remote host not found")
|
||||
}
|
||||
|
||||
func NewSyncedPool(local *GrainLocalPool, hostname string, discovery Discovery) (*SyncedPool, error) {
|
||||
|
||||
Reference in New Issue
Block a user