mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-16 05:36:50 +00:00
Make /sync respond early on server shutdown
This commit is contained in:
1 parent
d8e6d95f4b
commit
33a16f4831
1 file changed
+1
-1
@@ -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()));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user