21f9329d5d
esp_wifi_connect will return ESP_OK for the normal path of execution which just means the reconnect is started, not that it is actually reconnected. In such a case wifi.isconnected() should return False until the reconnection is complete. After reconnect a GOT_IP event is called and it will change wifi_sta_connected back to True.