esp_wifi: fix the bug that no event when run connect twice Closes WIFI-2390 See merge request espressif/esp-idf!10515