2 Replies Latest reply on Oct 8, 2019 4:30 AM by PriyaM_16

    http_client_connect memory usage on connection failure


      I am working around a condition when an AP to which the WICED device is connected stops unexpectedly. This can happen when AP loses internet access or somehow goes down. This usually results in a disconnect callback and my app tries to reconnect using the http_client_connect() API. At this point if I make this connect call I get an error 7014(socket close) and then 9(host down).

      Repeated calls in such a situation seems to be causing memory usage growth in v6.4 as compared to v6.1.

      There is a link down callback to handle a host down situation, but memory growth is concerning as this also happens on a socket close error(AP is not down, but loses internet access).

      I have attached a basic test app to recreate this. It can run on both v6.4 and v6.1. I simulate by creating a hotspot to which the WICED device connects. If I close the hotspot after the test app initiates and and keep calling the connect API, memory keeps growing in v6.4 but not in v6.1. Has there been a change from 6.1 to 6.4 that would warrant a different way to handle this call - like a clean-up?

      Also attached two logs when I ran the program on both versions. Platform is 43438, 1LD. Hope you can give some suggestions.