diff --git a/mqtt-v5-broker/src/broker.rs b/mqtt-v5-broker/src/broker.rs index 9b02c7a..e6d2cf5 100644 --- a/mqtt-v5-broker/src/broker.rs +++ b/mqtt-v5-broker/src/broker.rs @@ -168,7 +168,7 @@ pub enum WillDisconnectLogic { #[derive(Debug)] pub enum BrokerMessage { NewClient(Box, Sender), - Publish(String, PublishPacket), + Publish(String, Box), PublishAck(String, PublishAckPacket), // TODO - This can be handled by the client task PublishRelease(String, PublishReleasePacket), // TODO - This can be handled by the client task PublishReceived(String, PublishReceivedPacket), @@ -662,7 +662,7 @@ impl Broker { self.handle_disconnect(client_id, will_disconnect_logic); }, BrokerMessage::Publish(client_id, packet) => { - self.handle_publish(client_id, packet); + self.handle_publish(client_id, *packet); }, BrokerMessage::PublishAck(client_id, packet) => { self.handle_publish_ack(client_id, packet); diff --git a/mqtt-v5-broker/src/client.rs b/mqtt-v5-broker/src/client.rs index cc1b16d..8bd915f 100644 --- a/mqtt-v5-broker/src/client.rs +++ b/mqtt-v5-broker/src/client.rs @@ -191,7 +191,7 @@ impl + Unpin, SI: Sink