Skip to content

Commit

Permalink
Fix confusing "out of memory" error.
Browse files Browse the repository at this point in the history
This happens when a client is kicked in the dynamic security plugin.

Closes #2525. Thanks to sezanzeb.
  • Loading branch information
ralight committed Aug 12, 2022
1 parent c4664f0 commit 775bd2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.txt
Expand Up @@ -18,6 +18,8 @@ Broker:
- Fix some PUBLISH messages not being counted in $SYS stats. Closes #2448.
- Fix incorrect return code being sent in DISCONNECT when a client session is
taken over. Closes #2607.
- Fix confusing "out of memory" error when a client is kicked in the dynamic
security plugin. Closes #2525.

Client library:
- Fix threads library detection on Windows under cmake. Bumps the minimum
Expand Down
4 changes: 2 additions & 2 deletions src/control.c
Expand Up @@ -65,9 +65,9 @@ int control__process(struct mosquitto *context, struct mosquitto_msg_store *stor
}

if(stored->qos == 1){
if(send__puback(context, stored->source_mid, MQTT_RC_SUCCESS, properties)) rc = 1;
rc = send__puback(context, stored->source_mid, MQTT_RC_SUCCESS, properties);
}else if(stored->qos == 2){
if(send__pubrec(context, stored->source_mid, MQTT_RC_SUCCESS, properties)) rc = 1;
rc = send__pubrec(context, stored->source_mid, MQTT_RC_SUCCESS, properties);
}
mosquitto_property_free_all(&properties);

Expand Down

0 comments on commit 775bd2e

Please sign in to comment.