diff --git a/src/lib.rs b/src/lib.rs index 3f46891..dcfa189 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -77,7 +77,7 @@ pub mod mqtt_client { Err(e) => println!("ERROR: publisher: failed to receve an message ({})", e), Ok(msg) => { println!("INFO : publisher: topic={}; payload={}", msg.topic, msg.payload); - match client.publish(msg.topic, QoS::AtMostOnce, false, msg.payload) { + match client.publish(msg.topic, msg.qos, msg.retain, msg.payload) { Err(_n) => println!("ERROR: publisher: failed to publish"), Ok(_n) => {} }