From 920236f1ec4ca331092c3671dfe96d9da0be3257 Mon Sep 17 00:00:00 2001 From: leafx54 Date: Tue, 26 May 2026 06:33:23 -0400 Subject: [PATCH] fix: meshd watch replays full event history on start runWatch started with since=0, causing Syncthing's entire event log to flood stdout on launch. Call InitEventID() before the event loop to establish a session baseline, matching how the MCP server and TUI handle it. Affects both the streaming mode and --until mode. --- cmd/meshd/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/meshd/main.go b/cmd/meshd/main.go index f7fe7c4..850ee3e 100644 --- a/cmd/meshd/main.go +++ b/cmd/meshd/main.go @@ -492,6 +492,8 @@ func runWatch(client *syncthing.Client, args []string) { timeout := fs.Duration("timeout", 30*time.Second, "timeout for --until") fs.Parse(args) + client.InitEventID() + if *until != "" { deadline := time.Now().Add(*timeout) since := 0