Make /sync respond early on server shutdown
This commit is contained in:
parent
d8e6d95f4b
commit
33a16f4831
1 changed files with 1 additions and 1 deletions
|
|
@ -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()));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue