mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-08-06 15:15:15 +08:00

select() should not judge socket fd just SHUTDOWN state when other socket closed actively those socket will be in unreadable or unwriteable abnormal step before:[ESP8266 as the tcp server] 1. ESP8266 set up a listen port (system default: socket = 0) 2. Client 1 connect to ESP8266 OK (system default: socket = 1) 3. Client 1 send data OK 4. Client 2 connect to ESP8266 OK (system default: socket = 2) 5. Client 1 and Client 2 send data OK 6. Disconnect Client 2 actively, Client 1 send data OK 7. Client 2 reconnect to ESP8266 OK (system default: socket = 2) 8. Client 1 and Client 2 send data OK 9. Disconnect Client 1 actively, select() API will return -1 if Client 2 send data at this time, tcp server will not work internal: 7c50f410
505 KiB
505 KiB