Make timeout configurable

This commit is contained in:
timvisee 2018-11-20 12:42:27 +01:00
parent 0054daadff
commit f693ff42d3
No known key found for this signature in database
GPG key ID: 109CBA0BF74036C2
12 changed files with 99 additions and 22 deletions

View file

@ -1,8 +1,6 @@
use std::time::Duration;
/// The timeout for the Send client for generic requests, `None` to disable.
pub const CLIENT_TIMEOUT: Option<Duration> = Some(Duration::from_secs(30));
/// The timeout for the Send client for generic requests, `0` to disable.
pub const CLIENT_TIMEOUT: u64 = 30;
/// The timeout for the Send client used to transfer (upload/download) files.
/// Make sure this is big enough, or file uploads will be dropped. `None` to disable.
pub const CLIENT_TRANSFER_TIMEOUT: Option<Duration> = Some(Duration::from_secs(24 * 60 * 60));
/// Make sure this is big enough, or file uploads will be dropped. `0` to disable.
pub const CLIENT_TRANSFER_TIMEOUT: u64 = 24 * 60 * 60;