less duplicate logs
Some checks failed
Build and Publish / BuildAndDeploy (push) Has been cancelled

This commit is contained in:
matst80
2024-11-10 00:46:35 +01:00
parent 2831e627b8
commit ee9f0e776f
2 changed files with 8 additions and 7 deletions

View File

@@ -302,11 +302,9 @@ func (p *SyncedPool) handleConnection(conn net.Conn) {
case RemoteGrainChanged:
// remote grain changed
grainSyncCount.Inc()
log.Printf("Remote grain changed\n")
idAndHost := make([]byte, packet.DataLength)
_, err = conn.Read(idAndHost)
log.Printf("Remote grain %s changed\n", idAndHost)
if err != nil {
break
}
@@ -328,7 +326,6 @@ 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)
} else {
SendPacket(conn, AckChange, func(w io.Writer) error {
_, err := w.Write([]byte("ok"))