log more
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m51s

This commit is contained in:
matst80
2024-11-09 19:44:58 +01:00
parent 9e6c0a4b92
commit 68b6782253

View File

@@ -111,11 +111,15 @@ func NewSyncedPool(local *GrainLocalPool, hostname string, d Discovery) (*Synced
if h == hostname {
continue
}
found := false
for _, r := range pool.remotes {
if r.Host == h {
continue
found = true
}
}
if found {
continue
}
err := pool.AddRemote(h)
if err != nil {
log.Printf("Error adding undiscovered remote %s: %v\n", h, err)
@@ -224,6 +228,7 @@ func (p *SyncedPool) handleConnection(conn net.Conn) {
if !found {
log.Printf("Remote host %s not found\n", idAndHostParts[1])
log.Printf("Remotes %v\n", p.remotes)
SendPacket(conn, AckError, func(w io.Writer) error {
w.Write([]byte("remote host not found"))
return nil