I only get the first linkdown callback when I turn off AP.
I also have a TCP server which is very similiar to Wiced http_server or snip/tcp_server.c.
When I get a linkdown I want to:
After step 2 I get a reboot (watchdog?) or a System_monitor stop/reboot. TCP thread is watched by system monitor.
If I wait before stopping TCP server or delete the TCP socket it works and WiFi will come up again when it finds an AP. But I get a huge memory leak. ~20kbytes
Thinking about doing a reboot but it seems a bit crude.
How do I stop a TCP server when Wi-Fi is down?
Sorry for delayed response, did you mange to figure this out ? Or do you still need help.
With the latest SDK avlb there is an api for stopping the server