From ed8cac4ac29250ae8c34c82452a5e02425a8e3ba Mon Sep 17 00:00:00 2001 From: Bernhard Guillon Date: Tue, 7 Jul 2026 18:54:02 +0200 Subject: Add sync_done handshake: server signals when ready, client waits before watching --- cmd_linux.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd_linux.go') diff --git a/cmd_linux.go b/cmd_linux.go index 4239d1d..d9d392e 100644 --- a/cmd_linux.go +++ b/cmd_linux.go @@ -126,6 +126,10 @@ func handleClient(conn net.Conn, stack *GitignoreStack) { logInfo("sync: done") logInfo("watcher: monitoring for changes ...") conn.SetReadDeadline(time.Time{}) // no timeout during event monitoring + doneMsg := &ProtocolMessage{Type: "sync_done"} + doneData, _ := EncodeMessage(doneMsg) + doneData = append(doneData, '\n') + conn.Write(doneData) case "event_create": logDebug("event: create %s", msg.Path) -- cgit v1.2.3