mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 01:29:21 -04:00
fix(example): Fix wss_server_example not close socket
Closes https://github.com/espressif/esp-idf/issues/9163
This commit is contained in:
parent
9f72659da8
commit
63ed429a49
@ -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"
|
||||
#include "sdkconfig.h"
|
||||
@ -111,6 +111,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 = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user