Skip to content

Commit

Permalink
adding special case for WAIT
Browse files Browse the repository at this point in the history
  • Loading branch information
TJ Zhang committed Jun 29, 2024
1 parent 745ae30 commit 818472e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions glide-core/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,12 @@ fn get_timeout_from_cmd_arg(
format!("Received timeout = {:?}.", timeout_secs),
)))
} else if timeout_secs == 0.0 {
// `0` means we should set no timeout
Ok(RequestTimeoutOption::NoTimeout)
if (std::str::from_utf8(&cmd.command().unwrap_or_default()) == Ok("WAIT")) {
Ok(RequestTimeoutOption::ClientConfig)
} else {
// `0` means we should set no timeout
Ok(RequestTimeoutOption::NoTimeout)
}
} else {
// We limit the maximum timeout due to restrictions imposed by Redis and the Duration crate
if timeout_secs > u32::MAX as f64 {
Expand Down

0 comments on commit 818472e

Please sign in to comment.