File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
bindings/matrix-sdk-ffi/src Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,11 @@ pub struct ClientBuilder {
133
133
threads_enabled : bool ,
134
134
}
135
135
136
+ /// The timeout applies to each read operation, and resets after a successful
137
+ /// read. This is more appropriate for detecting stalled connections when the
138
+ /// size isn’t known beforehand.
139
+ const DEFAULT_READ_TIMEOUT : Duration = Duration :: from_secs ( 60 ) ;
140
+
136
141
#[ matrix_sdk_ffi_macros:: export]
137
142
impl ClientBuilder {
138
143
#[ uniffi:: constructor]
@@ -539,6 +544,7 @@ impl ClientBuilder {
539
544
if let Some ( timeout) = config. timeout {
540
545
updated_config = updated_config. timeout ( Duration :: from_millis ( timeout) ) ;
541
546
}
547
+ updated_config = updated_config. read_timeout ( DEFAULT_READ_TIMEOUT ) ;
542
548
if let Some ( max_concurrent_requests) = config. max_concurrent_requests {
543
549
if max_concurrent_requests > 0 {
544
550
updated_config = updated_config. max_concurrent_requests ( NonZeroUsize :: new (
You can’t perform that action at this time.
0 commit comments