[fractal/timeout-duration: 3/3] 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: 3/3] API, sync: increase timeout to avoid hammering the server
- Date: Thu, 13 Feb 2020 07:21:06 +0000 (UTC)
commit 8dd0ef2adc6622581bd346113ca7a3299ecb718b
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]