From 860794d76e6af4d9a4705692cf4a779f69da7814 Mon Sep 17 00:00:00 2001 From: Jules Comte Date: Thu, 2 Jun 2022 16:51:18 -0400 Subject: [PATCH] two small fixes for the esp32 ping demo --- broker/src/main.rs | 2 +- sphinx-key/src/conn/mqtt.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/broker/src/main.rs b/broker/src/main.rs index e4ebb0b..9940e19 100644 --- a/broker/src/main.rs +++ b/broker/src/main.rs @@ -24,7 +24,7 @@ fn main() { rt.build().unwrap().block_on(async { let (msg_tx, mut msg_rx): (mpsc::UnboundedSender>, mpsc::UnboundedReceiver>) = mpsc::unbounded_channel(); let (mut tx, mut rx) = builder.connect("localclient", 200).await.unwrap(); - tx.subscribe([SUB_TOPIC, TRIGGER_TOPIC]).await.unwrap(); + tx.subscribe([TRIGGER_TOPIC]).await.unwrap(); let console_task = tokio::spawn(console); diff --git a/sphinx-key/src/conn/mqtt.rs b/sphinx-key/src/conn/mqtt.rs index 69c21fd..0bca42d 100644 --- a/sphinx-key/src/conn/mqtt.rs +++ b/sphinx-key/src/conn/mqtt.rs @@ -78,7 +78,7 @@ pub fn start_listening( client.subscribe(TOPIC, QoS::AtMostOnce)?; client.publish( - TOPIC, + RETURN_TOPIC, QoS::AtMostOnce, false, format!("Hello from {}!", CLIENT_ID).as_bytes(),