Skip to content

Commit

Permalink
feat: read unsubscribe packet in v5 (#626)
Browse files Browse the repository at this point in the history
  • Loading branch information
coderr01 authored May 30, 2023
1 parent 7a4b895 commit 1654935
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions rumqttd/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed

### Fixed
- MQTTv5: Read the Unsubscribe package in match arms (#625)

### Security

Expand Down
4 changes: 4 additions & 0 deletions rumqttd/src/protocol/v5/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,10 @@ impl Protocol for V5 {
let (suback, properties) = suback::read(fixed_header, packet)?;
Packet::SubAck(suback, properties)
}
Packet::Unsubscribe => {
let (unsubscribe, properties) = unsubscribe::read(fixed_header, packet)?;
Packet::Unsubscribe(unsubscribe, properties)
}
PacketType::PingReq => Packet::PingReq(PingReq),
PacketType::PingResp => Packet::PingResp(PingResp),
PacketType::Disconnect => {
Expand Down

0 comments on commit 1654935

Please sign in to comment.