In our application, we connect to wifi AP and do stuffs. If we got some issues like request http error or disconnect with mqtt broker, we will retry to connect again. Incase retry not success we will disconnect with wifi AP and retry to connect current wifi AP again or connect the another wifi AP.
But sometime we got stuck forever in wiced_leave_ap.
I use CYW54907 with Wiced studio 6.6.
So this issue can be still duplicated, would you please share more logs or steps for the issue？
anyway, you can have a try to just do disconnection and reconnection in a single thread without HTTP, mqtt involved.
and if possible,you can share some application layer code to us for a duplication.