mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-27 01:22:10 +03:00
fix(resilience): drain heavyweight SSE on SIGTERM (#11020)
Validated on the combined batch board + this branch alone: chat-body-admission + authz/pipeline 65/65, file-size gate green with a dated frozen entry (chatBodyAdmission 1005→1009 — the +4 lease/drain wiring lines, owner-authorized rebaseline). trackRequest was never called, so SIGTERM waitForDrain saw zero in-flight and killed live SSE; leases now hold the drain counter for the stream's lifetime, and the 503 carries Retry-After. Closes #11015. Thank you @RaviTharuma!
This commit is contained in:
@@ -205,6 +205,7 @@ function drainingResponse(requestId: string): NextResponse {
|
||||
{ status: 503 }
|
||||
);
|
||||
response.headers.set(AUTHZ_HEADER_REQUEST_ID, requestId);
|
||||
response.headers.set("Retry-After", "5");
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user