Skip to content

Commit

Permalink
added proper timeout to upgrade_worker() call in upgrade_main()
Browse files Browse the repository at this point in the history
  • Loading branch information
Keksoj authored and FlorentinDUBOIS committed Jul 13, 2022
1 parent 48e9493 commit 5629cca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/src/ctl/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fn read_channel_message_with_timeout(
timeout: Duration,
) -> anyhow::Result<CommandResponse> {
match channel.read_message_blocking_timeout(Some(timeout)) {
None => bail!("The proxy didn't answer"),
None => bail!("Command timeout. The proxy didn't send an answer"),
Some(payload) => Ok(payload),
}
}
Expand Down Expand Up @@ -328,7 +328,7 @@ pub fn upgrade_main(
running_count
);

upgrade_worker(&mut channel, Duration::ZERO, worker.id)
upgrade_worker(&mut channel, timeout, worker.id)
.with_context(|| "Upgrading the worker failed")?;
//thread::sleep(Duration::from_millis(1000));
}
Expand Down

0 comments on commit 5629cca

Please sign in to comment.