Repository navigation
v0.4.1 — Proxy survives a daemon restart
v0.4.1 — Proxy survives a daemon restart
Fixed
Proxyfollows a replaced daemon. Before this release,Proxyread the daemon's port once. After a restart, a crash or an idle shutdown, the next request failed andProxyreturned, so every MCP client had to reconnect by hand. The lease was not re-attached either, so the new daemon saw zero agents while clients were still open. Now:- when its lease drops, the proxy looks for a daemon in the PID file for up to
Config.Timeoutand re-attaches. It never starts one there:Stop,Holdand the idle timer are not undone by an idle client; - a request whose dial failed, or that a daemon answered with 401 (another daemon on the old port), is sent once more after reconnecting (
EnsureRunningwhenConfig.Binaryis set, otherwise the PID file); - a request that failed after it was sent is answered with a JSON-RPC error for its id (
-32603, "daemon unavailable: …") and is never sent again, because it may have run. Notifications get no answer; Proxyreturns only when its context ends, stdin ends or fails, or stdout fails.
- when its lease drops, the proxy looks for a daemon in the PID file for up to
No API changes.
go get github.com/grpmsoft/daemon@v0.4.1
Full Changelog: v0.4.0...v0.4.1