mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 12:10:59 +00:00
fix(server): Fix websocket server not support handle multiple connections when client send CLOSE frame
This commit is contained in:

committed by
Mahavir Jain

parent
62800f8e3b
commit
293830a8ee
@@ -753,6 +753,12 @@ esp_err_t httpd_req_new(struct httpd_data *hd, struct sock_db *sd)
|
||||
sd->ws_handler != NULL ? "Yes" : "No",
|
||||
sd->ws_close ? "Yes" : "No");
|
||||
if (sd->ws_handshake_done && sd->ws_handler != NULL) {
|
||||
if (sd->ws_close == true) {
|
||||
/* WS was marked as close state, do not deal with this socket */
|
||||
ESP_LOGD(TAG, LOG_FMT("WS was marked close"));
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
ret = httpd_ws_get_frame_type(r);
|
||||
ESP_LOGD(TAG, LOG_FMT("New WS request from existing socket, ws_type=%d"), ra->ws_type);
|
||||
|
||||
|
Reference in New Issue
Block a user