- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
My app connects to AWS over WiFi intermittently.
Please advise if the following sequence is correct-
- wiced_network_up()
- wiced_aws_init()
- wiced_aws_create_endpoint()
- wiced_aws_connect()
- bunch of wiced_aws_subscribe()
- bunch of wiced_aws_publish()
- wiced_aws_disconnect()
- wiced_aws_deinit()
- wicefd_network_down()
- After X minutes goto 1
Is it possible to shorten reconnection time described above by calling wiced_aws_init()/wiced_aws_create_endpoint() once upon the first connection, or does it have to be called on every (re)connection
Also,
There seem to be a memory leak when calling wiced_aws_disconnect().
At the end of the function there's a call to "free(aws)".
However the parameter aws that was dynamically allocated in wiced_aws_create_endpoint(), has an internal dynamic allocation (aws->mqtt.base) taking place in aws_internal_mqtt_init() that is not freed when its parent object (aws) is being freed !
Also(2),
Was this reported memory leak handled in the latest SDK? Should I follow the suggested solution in the post?
Your guidelines on how to deal with this use case are highly valuable and appreciated
Thanks
- Labels:
-
Wifi+Bluetooth