From ca06334f89511dc12b5c7f1005a7b7c905b2e954 Mon Sep 17 00:00:00 2001 From: Varun Reddy Date: Mon, 16 Oct 2017 17:27:59 -0700 Subject: [PATCH] clearing SubscriptionList entries in shadowActionAcks after subscription failure Fixes #62 --- src/aws_iot_shadow_records.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/aws_iot_shadow_records.c b/src/aws_iot_shadow_records.c index 534b97e5ce..c7fd289724 100644 --- a/src/aws_iot_shadow_records.c +++ b/src/aws_iot_shadow_records.c @@ -369,7 +369,8 @@ IoT_Error_t subscribeToShadowActionAcks(const char *pThingName, ShadowActions_t if(clearBothEntriesFromList) { if(indexAcceptedSubList >= 0) { SubscriptionList[indexAcceptedSubList].isFree = true; - } else if(indexRejectedSubList >= 0) { + } + if(indexRejectedSubList >= 0) { SubscriptionList[indexRejectedSubList].isFree = true; } if(SubscriptionList[indexAcceptedSubList].count == 1) {