update
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m55s

This commit is contained in:
matst80
2024-11-12 07:50:00 +01:00
parent 69dde41996
commit c98b92d563

View File

@@ -356,12 +356,13 @@ func (p *SyncedPool) addRemoteHost(address string, remote *RemoteHost) error {
log.Printf("Added remote %s\n", remote.Host) log.Printf("Added remote %s\n", remote.Host)
go func() { go func() {
p.Negotiate(known)
ids, err := remote.GetCartMappings() ids, err := remote.GetCartMappings()
if err != nil { if err != nil {
log.Printf("Error getting remote mappings: %v\n", err) log.Printf("Error getting remote mappings: %v\n", err)
return return
} }
log.Printf("Remote %s has %d grains\n", remote.Host, len(ids))
p.mu.Lock() p.mu.Lock()
for _, id := range ids { for _, id := range ids {
if p.local.grains[id] != nil { if p.local.grains[id] != nil {
@@ -376,6 +377,7 @@ func (p *SyncedPool) addRemoteHost(address string, remote *RemoteHost) error {
p.remoteIndex[id] = grain p.remoteIndex[id] = grain
} }
p.mu.Unlock() p.mu.Unlock()
p.Negotiate(known)
}() }()
return nil return nil
} }