From fd74e38ee0ab27010dd96123a0c5da6a7afe99f7 Mon Sep 17 00:00:00 2001 From: jochen Date: Sat, 31 Oct 2026 00:32:26 +0100 Subject: [PATCH] Start route-proxy's provider helper only once Serve holds the runtime's channel, so its first watch is never refused and the helper never stops until a restart (issue 774, review) --- modules/route-proxy/cmd/route-provider/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/route-proxy/cmd/route-provider/main.go b/modules/route-proxy/cmd/route-provider/main.go index 8887ed6..a00a709 100644 --- a/modules/route-proxy/cmd/route-provider/main.go +++ b/modules/route-proxy/cmd/route-provider/main.go @@ -28,6 +28,9 @@ func main() { } else { p := newProvider(node, provider.StateBus(ModuleName), say) go func() { + // The helper's watches go through the runtime's channel, which Serve holds: one asked before it does is + // refused ("before Serve"), Run returns and the helper stays stopped until the process restarts. + <-stdio.Served() if err := p.Run(context.Background()); err != nil { say("the provider helper stopped: %v", err) }