Closed pbendersky closed 5 years ago
Thank you for investigating this. I will recheck that this change does not break ESP8266 functionality and merge ASAP
BTW with repro steps you’ve mentioned, do you actually get a meaningful response? Because tou access encryption protected API without encryption and should always get 401 or 403. That said, it does not matter which URL you access, you just need to connect and then disconnect.
I’ve merged an extended version of this fix, so it should be fine now. Closing this one.
I do get a JSON, not 401 or 403. Saw the fix, thank you!
See issue #84 that I reported.
To reproduce it, on fresh install I'd run
curl -v 192.168.1.56:5556/characteristics?id=1.10
several times (my device has that characteristic present). After about 10 times,homekit_server_accept_client
starts failing because theaccept
call returns< 0
. After inspection, theerrno
set is 23, which means the socket is not getting properly closed.As per https://github.com/espressif/esp-idf/pull/537, it seems that instead of
lwip_close
we need to be callinglwip_close_r
, for threading issues. Sincelwip_close_r
is not present in esp-open-rtos, I changed the calls toclose
, that map tolwip_close
on ESP8266 and tolwip_close_r
on ESP32.This fixed my "No Response" issue on an ESP32.