src/http/server.ts:1862 serves with reusePort under FORGE_SELF_SWAP; during the handover linger both processes accept (SO_REUSEPORT hashes new connections to both), and the old one ends with web.stop(true), force-closing active connections, so a long git push or clone in flight is cut. Bun's server.stop(false) stops accepting and lets in-flight requests finish (bun.com/docs/runtime/http/server).
Done: at drain start the old process calls stop(false) so new connections go only to the new process, waits for in-flight requests up to the drain budget, then stop(true). A test rolls two forge processes on one data dir with a 30 s push in flight: the push completes, no connection is refused. Part of #1432.
src/http/server.ts:1862 serves with reusePort under FORGE_SELF_SWAP; during the handover linger both processes accept (SO_REUSEPORT hashes new connections to both), and the old one ends with web.stop(true), force-closing active connections, so a long git push or clone in flight is cut. Bun's server.stop(false) stops accepting and lets in-flight requests finish (bun.com/docs/runtime/http/server).
Done: at drain start the old process calls stop(false) so new connections go only to the new process, waits for in-flight requests up to the drain budget, then stop(true). A test rolls two forge processes on one data dir with a 30 s push in flight: the push completes, no connection is refused. Part of #1432.