# AWS MQTT connection dies after some point

**URL:** <https://forums.freertos.org/t/aws-mqtt-connection-dies-after-some-point/8977>\
**Category:** AWS\
**Created:** [December 24, 2019, 6:04pm UTC](https://forums.freertos.org/t/aws-mqtt-connection-dies-after-some-point/8977 "2019-12-24T18:04:24Z")\
**Posts on this page:** 1\
**Showing post:** 31

<div class="post-metadata">

**Author:** ![wanggord](https://avatars.discourse-cdn.com/v4/letter/w/4af34b/32.png) [@wanggord](https://forums.freertos.org/u/wanggord)\
**Post date:** [January 24, 2020, 10:07pm UTC](https://forums.freertos.org/t/aws-mqtt-connection-dies-after-some-point/8977/31 "2020-01-24T22:07:45Z")

</div>

**[gordon-AWS](https://forums.aws.amazon.com/profile.jspa?userID=442042)** wrote on January 24, 2020:

Glad you figured it out!

Unrelated: are you calling AwsIotShadow\_Cleanup somewhere before the call to AwsIotShadow\_Init? You must call AwsIotShadow\_Cleanup to avoid leaking memory if AwsIotShadow\_Init was called before.

---

_[View the full topic](https://forums.freertos.org/t/aws-mqtt-connection-dies-after-some-point/8977)._
