mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-11-03 22:08:28 +00:00 
			
		
		
		
	Don't ignore return value of httpd_stop
This commit is contained in:
		@@ -206,12 +206,12 @@ static httpd_handle_t start_wss_echo_server(void)
 | 
			
		||||
    return server;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void stop_wss_echo_server(httpd_handle_t server)
 | 
			
		||||
static esp_err_t stop_wss_echo_server(httpd_handle_t server)
 | 
			
		||||
{
 | 
			
		||||
    // Stop keep alive thread
 | 
			
		||||
    wss_keep_alive_stop(httpd_get_global_user_ctx(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,
 | 
			
		||||
@@ -219,8 +219,8 @@ static void disconnect_handler(void* arg, esp_event_base_t event_base,
 | 
			
		||||
{
 | 
			
		||||
    httpd_handle_t* server = (httpd_handle_t*) arg;
 | 
			
		||||
    if (*server) {
 | 
			
		||||
        stop_wss_echo_server(*server);
 | 
			
		||||
        *server = NULL;
 | 
			
		||||
        if (stop_wss_echo_server(*server) == ESP_OK)
 | 
			
		||||
            *server = NULL;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user