mirror of
https://github.com/chatmail/core.git
synced 2026-04-22 16:06:30 +03:00
feat: replace reqwest with hyper
This change replaces usage of `reqwest` and `hyper-util` with custom connection establishment code so it is done in the same way as for IMAP and SMTP connections. This way we control HTTP, IMAP and SMTP connection establishment and schedule connection attempts to resolved IP addresses in the same way for all 3 protocols.
This commit is contained in:
@@ -29,13 +29,6 @@ use tls::wrap_tls;
|
||||
/// This constant should be more than the largest expected RTT.
|
||||
pub(crate) const TIMEOUT: Duration = Duration::from_secs(60);
|
||||
|
||||
/// Transaction timeout, e.g. for a GET or POST request
|
||||
/// together with all connection attempts.
|
||||
///
|
||||
/// This is the worst case time user has to wait on a very slow network
|
||||
/// after clicking a button and before getting an error message.
|
||||
pub(crate) const TRANSACTION_TIMEOUT: Duration = Duration::from_secs(300);
|
||||
|
||||
/// TTL for caches in seconds.
|
||||
pub(crate) const CACHE_TTL: u64 = 30 * 24 * 60 * 60;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user