diff options
author | Lukasz Woznicki <75632179+makr11st@users.noreply.github.com> | 2021-12-10 14:26:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-10 15:26:59 +0100 |
commit | 65a3217b04b1eef822a9fcb2d8afc1695fb7a9fc (patch) | |
tree | 9a96019f13e301a0170298b9d68d8002a37a3dee /crates/core/tedge | |
parent | 54c61346906ceffe6b8a56d9d9a1a23d74689841 (diff) |
A quick workaround for the issue: use the same wait for mosquitto as on first restart. WIP on proper pub/sub check (#707)
Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
Co-authored-by: Rina Fujino <18257209+rina23q@users.noreply.github.com>
Diffstat (limited to 'crates/core/tedge')
-rw-r--r-- | crates/core/tedge/src/cli/connect/command.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/core/tedge/src/cli/connect/command.rs b/crates/core/tedge/src/cli/connect/command.rs index 46419f08..fb2f9d17 100644 --- a/crates/core/tedge/src/cli/connect/command.rs +++ b/crates/core/tedge/src/cli/connect/command.rs @@ -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(_) => { |