|
|
|
@ -73,7 +73,16 @@ async fn event_loop_task(
@@ -73,7 +73,16 @@ async fn event_loop_task(
|
|
|
|
|
match incoming { |
|
|
|
|
rumqttc::Packet::ConnAck(_) => { |
|
|
|
|
info!("MQTT connected"); |
|
|
|
|
interface.publish_connected(true).await?; |
|
|
|
|
{ |
|
|
|
|
// HACK: this really should just be await
|
|
|
|
|
// but that can sometimes deadlock if the publish channel is full
|
|
|
|
|
let mut interface = interface.clone(); |
|
|
|
|
let fut = async move { |
|
|
|
|
interface.publish_connected(true).await |
|
|
|
|
}; |
|
|
|
|
tokio::spawn(fut); |
|
|
|
|
} |
|
|
|
|
//.await?;
|
|
|
|
|
} |
|
|
|
|
_ => {} |
|
|
|
|
} |
|
|
|
|