From ad95174a7ab4b1ea0de8b731e51c27e06b195e1f Mon Sep 17 00:00:00 2001 From: Piyush Shah Date: Tue, 19 May 2020 21:47:00 +0530 Subject: [PATCH] esp_http_server: Fixed a bug which could cause issues with LRU purge LRU counter should be started from 1, and not 0, so that all checks work fine. Closes https://github.com/espressif/esp-idf/issues/4753 --- components/esp_http_server/src/httpd_sess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_http_server/src/httpd_sess.c b/components/esp_http_server/src/httpd_sess.c index 4387d582a..fb6bba106 100644 --- a/components/esp_http_server/src/httpd_sess.c +++ b/components/esp_http_server/src/httpd_sess.c @@ -202,7 +202,7 @@ static int fd_is_valid(int fd) static inline uint64_t httpd_sess_get_lru_counter() { static uint64_t lru_counter = 0; - return lru_counter++; + return ++lru_counter; } void httpd_sess_delete_invalid(struct httpd_data *hd)