From 90e3b287de5c50d556f0dc293b99a43712902ca7 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Fri, 21 May 2021 14:18:27 +0100 Subject: [PATCH] Remove redundant check, this is handled in send__pubrec. --- src/handle_publish.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/handle_publish.c b/src/handle_publish.c index 0656536d..675dfdd8 100644 --- a/src/handle_publish.c +++ b/src/handle_publish.c @@ -365,11 +365,7 @@ process_bad_message: rc = send__puback(context, msg->source_mid, reason_code, NULL); break; case 2: - if(context->protocol == mosq_p_mqtt5){ - rc = send__pubrec(context, msg->source_mid, reason_code, NULL); - }else{ - rc = send__pubrec(context, msg->source_mid, 0, NULL); - } + rc = send__pubrec(context, msg->source_mid, reason_code, NULL); break; } db__msg_store_free(msg);