title: ESP32/Arduino IDE: OTA using ESPHttpUpdate keeps rebooting
body: <p>We're a bunch of noobs trying to develop an ESP32 program that could be updated OTA with ESPHttpUpdate. The code we're using is the basic:</p>
  
  <pre><code> if((WiFi.status() == WL_CONNECTED)) {
      t_httpUpdate_return ret = ESPhttpUpdate.update("https://url.to/my.bin");
  
      switch(ret) {
          case HTTP_UPDATE_FAILED:
              Serial.printf("HTTP_UPDATE_FAILD Error (%d): %s", ESPhttpUpdate.getLastError(), ESPhttpUpdate.getLastErrorString().c_str());
              break;
  
          case HTTP_UPDATE_NO_UPDATES:
              Serial.println("HTTP_UPDATE_NO_UPDATES");
              break;
  
          case HTTP_UPDATE_OK:
              Serial.println("HTTP_UPDATE_OK");
              break;
      }
  }
  </code></pre>
  
  <p>In theory, it works. The program connects to WiFi, connects to the web server, downloads the new bin and flashes it successfully... Only in a loop. Once it downloads the new firmware, it flashes it, reboots the device, and starts all over again. I guess it's a simple question of getting it to recognize if the bin on the server is newer than the one on the device - but I can't seem to figure out how to do that :) Any pointers would be appreciated - Believe me I've googled a lot :)</p>
  
  <p>Thank you in advance,
  Seb</p>