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

@@ -182,10 +182,10 @@ static httpd_handle_t start_webserver(void)
return NULL;
}
static void stop_webserver(httpd_handle_t server)
static esp_err_t stop_webserver(httpd_handle_t server)
{
// Stop the httpd server
httpd_stop(server);
return httpd_stop(server);
}
@@ -195,8 +195,8 @@ static void disconnect_handler(void* arg, esp_event_base_t event_base,
httpd_handle_t* server = (httpd_handle_t*) arg;
if (*server) {
ESP_LOGI(TAG, "Stopping webserver");
stop_webserver(*server);
*server = NULL;
if (stop_webserver(*server) == ESP_OK)
*server = NULL;
}
}