Make /sync respond early on server shutdown

This commit is contained in:
dasha_uwu authored and Jason Volk committed 2025-08-29 06:49:04 +00:00
1 parent d8e6d95f4b
commit 33a16f4831
1 file changed
+1 -1
+1 -1
View File
@@ -177,7 +177,7 @@ pub(crate) async fn sync_events_route(
}
// Wait for activity
if time::timeout_at(stop_at, watchers).await.is_err() {
if time::timeout_at(stop_at, watchers).await.is_err() || services.server.is_stopping() {
trace!(since, next_batch, "empty response");
return Ok(sync_events::v3::Response::new(next_batch.to_string()));
}