From 7dccc869b495205d10ca834d3beb7f318b618549 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sat, 4 Nov 2023 19:40:04 +0600 Subject: [PATCH] wip --- CHANGES.md | 4 ++++ Cargo.toml | 2 +- src/v5/codec/packet/subscribe.rs | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 17cc91a..c5b6973 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Changes +## [0.12.7] - 2023-11-04 + +* Fix v5::Subscribe packet encoding + ## [0.12.6] - 2023-10-31 * Send server ConnectAck without io flushing diff --git a/Cargo.toml b/Cargo.toml index 33b4c42..401e1cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ntex-mqtt" -version = "0.12.6" +version = "0.12.7" authors = ["ntex contributors "] description = "Client and Server framework for MQTT v5 and v3.1.1 protocols" documentation = "https://docs.rs/ntex-mqtt" diff --git a/src/v5/codec/packet/subscribe.rs b/src/v5/codec/packet/subscribe.rs index a3c7dca..55fc91f 100644 --- a/src/v5/codec/packet/subscribe.rs +++ b/src/v5/codec/packet/subscribe.rs @@ -334,6 +334,7 @@ mod tests { let size = pkt.encoded_size(99999); let mut buf = BytesMut::with_capacity(size); pkt.encode(&mut buf, size as u32).unwrap(); + assert_eq!(buf.len(), size); assert_eq!(pkt, Subscribe::decode(&mut buf.freeze()).unwrap()); }