diff --git a/synced-pool.go b/synced-pool.go index 8d23fb3..e463569 100644 --- a/synced-pool.go +++ b/synced-pool.go @@ -101,7 +101,7 @@ func (p *SyncedPool) GrainOwnerChangeHandler(data []byte) (PoolMessage, []byte, idAndHostParts := strings.Split(string(data), ";") if len(idAndHostParts) != 2 { log.Printf("Invalid remote grain change message\n") - return AckChange, []byte("incorrect"), nil + return AckChange, []byte("incorrect"), fmt.Errorf("invalid remote grain change message") } id := ToCartId(idAndHostParts[0]) host := idAndHostParts[1] @@ -110,7 +110,7 @@ func (p *SyncedPool) GrainOwnerChangeHandler(data []byte) (PoolMessage, []byte, if r.Host == host { // log.Printf("Remote grain %s changed to %s\n", id, host) - p.SpawnRemoteGrain(id, host) + go p.SpawnRemoteGrain(id, host) return AckChange, []byte("ok"), nil }