]> granicus.if.org Git - esp-idf/commit
httpd_sess_close: Check for session validity before closing
authorPiyush Shah <piyush@espressif.com>
Tue, 6 Aug 2019 14:00:58 +0000 (19:30 +0530)
committerPiyush Shah <piyush@espressif.com>
Fri, 9 Aug 2019 09:28:28 +0000 (14:58 +0530)
commit107d9275474c89428cf43599ac84cb2f74d5f449
tree3f704b26c445b4493cc522f7fdb0fc044a68f6cd
parentf023bf52c9c243efd15b02c3bb5397649ff89989
httpd_sess_close: Check for session validity before closing

If httpd_sess_trigger_close() gets called twice for the same socket,
the first httpd_sess_close() cb closes the correct socket, but the second
invocation closes the wrong socket which was just accepted and added to
the socket db. Checking for the lru counter will help identify this as the
counter is set only for requests actually served.
components/esp_http_server/src/httpd_sess.c