You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RunnerManager.reload() terminates the previous runner immediately, resetting in-flight requests #91
RunnerManager.reload(next) detaches the current runner, attaches next, and then awaits previous.close(). BaseEnvRunner.close() rejects pending requests and calls _closeRuntime(), which for node-worker is worker.terminate(). Everything the previous runner already accepted is cut off at the moment of the swap: in-flight fetches, streaming responses, and upgraded WebSockets.
Nitro's dev server reloads through manager.reload(runner), so every rebuild resets these connections. Short requests rarely notice. Long-lived ones do: SSE and streamed responses that run for minutes (agent turns, in eve's case) end with ECONNRESET mid-stream.
A drain mode would cover this: send new requests and upgrades to the new runner right away, keep the previous runner alive until its active exchanges and sockets settle (with an optional upper bound), then retire it through shutdown() instead of close(). For example reload(runner, { drain: true }) or { drain: { timeout } }, which Nitro's dev server could then opt into.
eve currently runs its own dev server for this reason. It counts active exchanges per runner and terminates a retired worker only once the last one settles (DrainedNitroDevServer). It would switch back to Nitro's createDevServer once equivalent drain semantics exist upstream.
Activity