mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 04:27:02 +01:00
Resolve incorrect time units on timeout (#2014)
This commit is contained in:
parent
64fcb4b724
commit
1fb34a91e3
|
@ -81,12 +81,12 @@ pub async fn call_daemon(
|
|||
req: ClientRequest,
|
||||
timeout: u64,
|
||||
) -> Result<ClientResponse, Box<dyn Error>> {
|
||||
let sleep = time::sleep(Duration::from_millis(timeout));
|
||||
let sleep = time::sleep(Duration::from_secs(timeout));
|
||||
tokio::pin!(sleep);
|
||||
|
||||
tokio::select! {
|
||||
_ = &mut sleep => {
|
||||
error!("Timed out making request to kanidm_unixd");
|
||||
error!(?timeout, "Timed out making request to kanidm_unixd");
|
||||
Err(Box::new(IoError::new(ErrorKind::Other, "timeout")))
|
||||
}
|
||||
res = call_daemon_inner(path, req) => {
|
||||
|
|
Loading…
Reference in a new issue