Merge branch 'bugfix/fix_wss_server_example_v4.4' into 'release/v4.4'

fix(example): Fix wss_server_example not close socket (backport v4.4)

See merge request espressif/esp-idf!18602
This commit is contained in:
Jiang Jiang Jian 2022-06-30 16:47:24 +08:00
commit 54e01833be

View File

@ -15,7 +15,7 @@
#include "esp_netif.h"
#include "esp_eth.h"
#include "protocol_examples_common.h"
#include "lwip/sockets.h"
#include <esp_https_server.h>
#include "keep_alive.h"
@ -110,6 +110,7 @@ void wss_close_fd(httpd_handle_t hd, int sockfd)
ESP_LOGI(TAG, "Client disconnected %d", sockfd);
wss_keep_alive_t h = httpd_get_global_user_ctx(hd);
wss_keep_alive_remove_client(h, sockfd);
close(sockfd);
}
static const httpd_uri_t ws = {