Don't ignore return value of httpd_stop

This commit is contained in:
Nathan Phillips
2022-04-22 11:19:27 +01:00
committed by BOT
parent 523c51818c
commit e8e63a06e8
10 changed files with 34 additions and 40 deletions

View File

@@ -139,10 +139,10 @@ static httpd_handle_t start_webserver(void)
return server;
}
static void stop_webserver(httpd_handle_t server)
static esp_err_t stop_webserver(httpd_handle_t server)
{
// Stop the httpd server
httpd_ssl_stop(server);
return httpd_ssl_stop(server);
}
static void disconnect_handler(void* arg, esp_event_base_t event_base,
@@ -150,8 +150,8 @@ static void disconnect_handler(void* arg, esp_event_base_t event_base,
{
httpd_handle_t* server = (httpd_handle_t*) arg;
if (*server) {
stop_webserver(*server);
*server = NULL;
if (stop_webserver(*server) == ESP_OK)
*server = NULL;
}
}