[fractal/timeout-duration: 25/25] API, sync: increase timeout to avoid hammering the server
- From: Alexandre Franke <afranke src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal/timeout-duration: 25/25] API, sync: increase timeout to avoid hammering the server
- Date: Fri, 21 Feb 2020 20:12:57 +0000 (UTC)
commit 6c7dc78782315802399697c1c5c845321aa2a6b0
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]