Track remote gateway work before auto-restart

This commit is contained in:
Daniel Kim
2026-09-30 13:31:41 -07:00
parent 0b6f836821
commit 39e288494e
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -4318,7 +4318,7 @@ impl Drop for Active {
}
}
async fn track_active(request: axum::extract::Request, next: Next) -> Response {
pub(crate) async fn track_active(request: axum::extract::Request, next: Next) -> Response {
// The dashboard holds its event stream open for as long as it is open.
if request.uri().path() == "/api/events" {
return next.run(request).await;
+1
View File
@@ -1124,6 +1124,7 @@ fn gateway_router(session: Arc<RemoteSession>) -> Router {
)
.fallback(gateway_fallback)
.layer(DefaultBodyLimit::max(64 * 1024 * 1024))
.layer(middleware::from_fn(super::up::track_active))
.layer(middleware::from_fn(gateway_loopback_guard))
.with_state(session)
}