premium timeout 295. public 60
This commit is contained in:
parent
6c8d11c005
commit
e0d1d4b517
@ -356,8 +356,17 @@ impl ValidatedRequest {
|
||||
_ => CacheMode::Never,
|
||||
};
|
||||
|
||||
// TODO: what should we do if we want a really short max_wait?
|
||||
let connect_timeout = Duration::from_secs(10);
|
||||
let expire_timeout = max_wait.unwrap_or_else(|| Duration::from_secs(295));
|
||||
|
||||
let expire_timeout = if let Some(max_wait) = max_wait {
|
||||
max_wait
|
||||
} else if authorization.active_premium().await {
|
||||
Duration::from_secs(295)
|
||||
} else {
|
||||
Duration::from_secs(60)
|
||||
}
|
||||
.max(connect_timeout);
|
||||
|
||||
let x = Self {
|
||||
archive_request: false.into(),
|
||||
|
Loading…
Reference in New Issue
Block a user