Skip to content

Commit

Permalink
A quick workaround for the issue: use the same wait for mosquitto as …
Browse files Browse the repository at this point in the history
…on first restart. WIP on proper pub/sub check (#707)

Signed-off-by: Lukasz Woznicki <[email protected]>

Co-authored-by: Rina Fujino <[email protected]>
  • Loading branch information
makr11st and rina23q authored Dec 10, 2021
1 parent 54c6134 commit 65a3217
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/core/tedge/src/cli/connect/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ impl Command for ConnectCommand {
self.service_manager.as_ref(),
&self.config_location,
)?;

println!(
"Awaiting mosquitto to start. This may take up to {} seconds.\n",
MOSQUITTO_RESTART_TIMEOUT_SECONDS
);
std::thread::sleep(std::time::Duration::from_secs(
MOSQUITTO_RESTART_TIMEOUT_SECONDS,
));
}
}
Err(_) => {
Expand Down

0 comments on commit 65a3217

Please sign in to comment.