forked from Deuxfleurs/garage
PollRange & PollItem: min timeout = 1 sec
This commit is contained in:
parent
bba13f40fc
commit
cbfae673e8
2 changed files with 2 additions and 2 deletions
|
@ -256,7 +256,7 @@ pub(crate) async fn handle_poll_range(
|
|||
|
||||
let query = parse_json_body::<PollRangeQuery>(req).await?;
|
||||
|
||||
let timeout_msec = query.timeout.unwrap_or(300).clamp(10, 600) * 1000;
|
||||
let timeout_msec = query.timeout.unwrap_or(300).clamp(1, 600) * 1000;
|
||||
|
||||
let resp = garage
|
||||
.k2v
|
||||
|
|
|
@ -206,7 +206,7 @@ pub async fn handle_poll_item(
|
|||
let causal_context =
|
||||
CausalContext::parse(&causality_token).ok_or_bad_request("Invalid causality token")?;
|
||||
|
||||
let timeout_msec = timeout_secs.unwrap_or(300).clamp(10, 600) * 1000;
|
||||
let timeout_msec = timeout_secs.unwrap_or(300).clamp(1, 600) * 1000;
|
||||
|
||||
let item = garage
|
||||
.k2v
|
||||
|
|
Loading…
Reference in a new issue