ESP8266 OTA won't connect a second time

Hi there,
I’m having some trouble flashing my code to my esp8266 over the air. My board was previously running the BasicOTA example and it worked fine. I just added a simple code in the Loop function to handle the OTA in the 60 secs after the board boot-up. The code uploaded on the board over the air with no problem but now I can’t upload anything on the board again… The board won’t connect to the wifi and I keep getting the “No Response” error.

My code is the Esp8266 BasicOTA example with the following Loop function.

void loop() {
if(ota_flag)
digitalWrite(3, HIGH);
{
while(millis() < 60000)
{
ArduinoOTA.handle();
delay(10);
}
ota_flag = false;
}
digitalWrite(2, !digitalRead(2));
digitalWrite(3, LOW);
delay(1000);
}

And the led won’t blink at all…
It’s weird because I tried the same code but with a delay of 120000 ms previously and the OTA was working perfectly, but the link won’t ever blink…
I can’t understand what’s happening.

Thank you in advance for your suggestions :smiley: