mirror of
https://github.com/espressif/esp-idf
synced 2025-03-13 02:59:13 -04:00
Merge branch 'bugfix/httpd_sess_close_v4.0' into 'release/v4.0'
httpd_sess_close: Check for session validity before closing (v4.0) See merge request espressif/esp-idf!5742
This commit is contained in:
commit
ef17d8bba1
@ -378,6 +378,10 @@ static void httpd_sess_close(void *arg)
|
|||||||
{
|
{
|
||||||
struct sock_db *sock_db = (struct sock_db *)arg;
|
struct sock_db *sock_db = (struct sock_db *)arg;
|
||||||
if (sock_db) {
|
if (sock_db) {
|
||||||
|
if (sock_db->lru_counter == 0) {
|
||||||
|
ESP_LOGD(TAG, "Skipping session close for %d as it seems to be a race condition", sock_db->fd);
|
||||||
|
return;
|
||||||
|
}
|
||||||
int fd = sock_db->fd;
|
int fd = sock_db->fd;
|
||||||
struct httpd_data *hd = (struct httpd_data *) sock_db->handle;
|
struct httpd_data *hd = (struct httpd_data *) sock_db->handle;
|
||||||
httpd_sess_delete(hd, fd);
|
httpd_sess_delete(hd, fd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user