I'm using network terminal project, my step is as below:
1. connect an AP use wlanconnect command
2. power down my AP, it will print the message Device disconnected from the AP: LMServerAP
3. connect the AP again, it will reach line 174(code after sem_wait_timeout) at the picture below immediately , but now timeout(it is 6 seconds) is not reached, and sem_post(&app_CB.CON_CB.connectEventSyncObj); also has not been done,
why it can go ahead and not block in sem_wait_timeout.
The first time I connect the AP it worked normally, it will sem_post firstly then unblock the sem_wait_timeout! But once I connected AP and restart the AP , connect the AP again, the phenomenon will occur!