Skip to content

Commit

Permalink
Update ElegantOTA.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushsharma82 authored Sep 2, 2023
1 parent 3f38631 commit ae81c9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ElegantOTA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ void ElegantOTAClass::begin(AsyncWebServer *server, const char * username, const
return _server->requestAuthentication();
}
// Post-OTA update callback
if (postUpdateCallback != NULL) postUpdateCallback(Update.hasError());
if (postUpdateCallback != NULL) postUpdateCallback(!Update.hasError());
_server->sendHeader("Connection", "close");
_server->send((Update.hasError()) ? 400 : 200, "text/plain", (Update.hasError()) ? _update_error_str.c_str() : "OK");
// Set reboot flag
Expand Down

0 comments on commit ae81c9c

Please sign in to comment.