[fractal/clippy-ci: 25/26] API, sync: increase timeout to avoid hammering the server



commit 8e63b144b06c6587d58f8b1d14b968746d0d25f3
Author: Alexandre Franke <afranke gnome org>
Date:   Sat Sep 28 15:23:52 2019 +0200

    API, sync: increase timeout to avoid hammering the server

 fractal-matrix-api/src/backend/sync.rs | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/fractal-matrix-api/src/backend/sync.rs b/fractal-matrix-api/src/backend/sync.rs
index 30fec620..a4711535 100644
--- a/fractal-matrix-api/src/backend/sync.rs
+++ b/fractal-matrix-api/src/backend/sync.rs
@@ -41,10 +41,12 @@ pub fn sync(
     let tx = bk.tx.clone();
     let data = bk.data.clone();
 
-    let (timeout, filter) = if !initial {
-        (time::Duration::from_secs(30), Default::default())
+    let timeout = time::Duration::from_secs(30000);
+
+    let filter = if !initial {
+        Default::default()
     } else {
-        let filter = Filter {
+        Filter {
             room: Some(RoomFilter {
                 state: Some(RoomEventFilter {
                     lazy_load_members: true,
@@ -75,9 +77,7 @@ pub fn sync(
                 "unsigned",
             ]),
             ..Default::default()
-        };
-
-        (Default::default(), filter)
+        }
     };
 
     let params = SyncParameters {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]