broker reconnection loop using tokio::select macro, both tx and rx

This commit is contained in:
Evan Feenstra
2022-06-09 13:07:46 -07:00
parent e4446f10c6
commit 895f79f61e
6 changed files with 162 additions and 51 deletions

View File

@@ -47,15 +47,15 @@ async fn main() -> Result<(), Box<dyn Error>> {
.await
.expect("could not mqtt subscribe");
client
.publish(
PUB_TOPIC,
QoS::AtMostOnce,
false,
"READY".as_bytes().to_vec(),
)
.await
.expect("could not pub");
// client
// .publish(
// PUB_TOPIC,
// QoS::AtMostOnce,
// false,
// "READY".as_bytes().to_vec(),
// )
// .await
// .expect("could not pub");
let matches = app.get_matches();
if matches.is_present("test") {