From 6a0834babcc8ea5ebd90120d5dd2d59dbc7e2d5d Mon Sep 17 00:00:00 2001 From: Jonathan de Jong Date: Wed, 8 Sep 2021 15:35:06 +0200 Subject: [PATCH] rename to SYNC_TIMEOUT --- src/client_server/sync.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client_server/sync.rs b/src/client_server/sync.rs index 7c66b68..843da6c 100644 --- a/src/client_server/sync.rs +++ b/src/client_server/sync.rs @@ -175,7 +175,7 @@ async fn sync_helper_wrapper( let _ = tx.send(Some(r.map(|(r, _)| r.into()))); } -const THIRTY_SECONDS: Duration = Duration::from_secs(30); +const SYNC_TIMEOUT: Duration = Duration::from_secs(30); #[tracing::instrument(skip(db))] async fn sync_helper( @@ -212,7 +212,7 @@ async fn sync_helper( && response.device_one_time_keys_count.is_empty() { // ...we wait until we get new data, or until timeout. - if tokio::time::timeout(timeout.unwrap_or_default().min(THIRTY_SECONDS), watcher) + if tokio::time::timeout(timeout.unwrap_or_default().min(SYNC_TIMEOUT), watcher) .await .is_ok() // But if we get new data (is_err is timeout)...