Skip to content

Commit 1941673

Browse files
committed
add explanation of why completion callback options for puback isn't bound out
1 parent 5095810 commit 1941673

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

source/v5/mqtt5_options_storage.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2296,7 +2296,15 @@ static void s_aws_mqtt5_operation_puback_manual_completion(
22962296
(void)completion_view;
22972297
struct aws_mqtt5_operation_puback *puback_op = operation->impl;
22982298

2299-
// Completion callback on manual PUBACK.
2299+
/* Completion callback on manual PUBACK.
2300+
* Completion callback options are not currently bound out as there is an edge case where
2301+
* we would return a successful completion of the manual puback as a redriven PUBLISH packet
2302+
* is simultaneously received. This could cause confusion to the user and cause them to
2303+
* assume the redriven PUBLISH is a new PUBLISH and not a duplicate of the one they have just
2304+
* gotten a PUBACK invoke success from. We may re-instate this in the future upon customer
2305+
* request. We retain the logic to help us provide better logs of what is going on in the
2306+
* event we need to track down bugs for a user or ourselves.
2307+
*/
23002308
if (puback_op->completion_options.completion_callback != NULL) {
23012309
// Convert error_code to manual puback result
23022310
enum aws_mqtt5_manual_puback_result puback_result = AWS_MQTT5_MPR_SUCCESS;

0 commit comments

Comments
 (0)