Skip to content

Conversation

@bittcrafter
Copy link
Collaborator

No description provided.

…ailure

- Added error mapping to remove inflight entry if `publish()` fails
- Separated ACK sending from publish operation for better error handling
- Guaranteed inflight message cleanup in both success and error cases

This prevents resource leaks when QoS 1 message publishing fails by ensuring the inflight tracking is properly maintained.
- Replaced `map_err` with `inspect_err` for cleaner error side effects
- Maintains same functionality: removes inflight entry on publish failure
- More idiomatic Rust error handling pattern
- Keeps original error unchanged while performing cleanup
fix(session): ensure proper cleanup of inflight messages on publish failure
@bittcrafter bittcrafter merged commit 0123f93 into rmqtt:master Aug 31, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant