diff options
| author | Bernhard Guillon <Bernhard.Guillon@begu.org> | 2026-07-07 18:54:02 +0200 |
|---|---|---|
| committer | Bernhard Guillon <Bernhard.Guillon@begu.org> | 2026-07-07 18:54:02 +0200 |
| commit | ed8cac4ac29250ae8c34c82452a5e02425a8e3ba (patch) | |
| tree | 203f53e393230e6739b42c7d061b575035d8821c /cmd_linux.go | |
| parent | 4b592f3a3b59eeb81591d868599886c6d7b34b00 (diff) | |
| download | sourcewatch-ed8cac4ac29250ae8c34c82452a5e02425a8e3ba.tar.gz sourcewatch-ed8cac4ac29250ae8c34c82452a5e02425a8e3ba.zip | |
Add sync_done handshake: server signals when ready, client waits before watching
Diffstat (limited to 'cmd_linux.go')
| -rw-r--r-- | cmd_linux.go | 4 |
1 files changed, 4 insertions, 0 deletions
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) |
