Fix broker session persistence and nonblocking CONTINUE handling - #575
Merged
embhorn merged 5 commits intoAug 18, 2026
Merged
Conversation
aidangarske
commented
Aug 17, 2026
Member
aidangarske
requested review from
dgarske and
embhorn
and removed request for
dgarske
August 17, 2026 22:18
aidangarske
marked this pull request as ready for review
August 17, 2026 22:51
embhorn
approved these changes
Aug 18, 2026
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Suppressed comments (2)
src/mqtt_broker.c:5512
sub->client->connack_pending_lenis referenced inside theWOLFMQTT_V5QoS0 path, but theBrokerClientmember is excluded underWOLFMQTT_STATIC_MEMORY. This will not compile for v5 + static-memory configurations.
/* QoS 0 is best effort; skip while tx_buf holds an in-flight
* CONNACK. */
else if (sub->client->connack_pending_len == 0)
#endif
{
src/mqtt_sn_client.c:2163
- In
WOLFMQTT_NONBLOCK,MqttPacket_Write()can returnMQTT_CODE_CONTINUEfor a partial send. This function currently treats anyrc != client->write.lenas a failure (and in multithread mode removes the pending response), but it does not track a send-in-progress state (e.g.,MQTT_MSG_HEADER) like other MQTT-SN flows in this file (seeSN_WillTopic). This can cause retries to re-add/remove the pending response incorrectly and lose the ability to safely resume the in-flight write.
/* Send disconnect packet */
rc = MqttPacket_Write(client, client->tx_buf, client->write.len);
if (rc != client->write.len) {
#ifdef WOLFMQTT_MULTITHREAD
wm_SemUnlock(&client->lockSend);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.