Skip to content

Commit

Permalink
main: delay restart to give HTTP POST response a chance
Browse files Browse the repository at this point in the history
  • Loading branch information
SpComb committed Jan 6, 2025
1 parent 6377e49 commit 5efb026
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main/system_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ int system_api_restart_handler(struct http_request *request, struct http_respons

LOG_INFO("restarting...");

// give LWIP stack a chance to send the HTTP response!
vTaskDelay(1000 / portTICK_RATE_MS);

// this function does not return
esp_restart();
system_restart();
}

0 comments on commit 5efb026

Please sign in to comment.