remove local grains if they exist
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m52s
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m52s
This commit is contained in:
@@ -269,6 +269,10 @@ func (p *SyncedPool) handleConnection(conn net.Conn) {
|
||||
found = true
|
||||
log.Printf("Remote grain %s changed to %s\n", idAndHostParts[0], idAndHostParts[1])
|
||||
p.mu.Lock()
|
||||
if p.local.grains[ToCartId(idAndHostParts[0])] != nil {
|
||||
log.Printf("Grain %s already exists locally, deleting\n", idAndHostParts[0])
|
||||
delete(p.local.grains, ToCartId(idAndHostParts[0]))
|
||||
}
|
||||
p.remoteIndex[ToCartId(idAndHostParts[0])] = r.Pool
|
||||
p.mu.Unlock()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user