mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-08-06 07:00:05 +08:00
fix(multi-sockets): Fix multi-clients connection abnormal
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
This commit is contained in:
2
VERSION
2
VERSION
@ -13,7 +13,7 @@ gwen:
|
||||
gitlab:
|
||||
espconn: 3a998034
|
||||
freertos: ac047746
|
||||
lwip: ac047746
|
||||
lwip: 94e6ac0e
|
||||
driver: 7bee5263
|
||||
mbedtls: 1ac9f1f4
|
||||
ssl: eefb383a
|
BIN
lib/liblwip.a
BIN
lib/liblwip.a
Binary file not shown.
@ -370,7 +370,8 @@ LOCAL int lwip_exit_mt_select(int s, int arg)
|
||||
}
|
||||
|
||||
for (i = 0; i < s; i++) {
|
||||
if (SOCK_MT_GET_SHUTDOWN(i) != SOCK_MT_SHUTDOWN_NONE) {
|
||||
if ((FD_ISSET(i, read_set) || FD_ISSET(i, write_set)) \
|
||||
&& SOCK_MT_GET_SHUTDOWN(i) != SOCK_MT_SHUTDOWN_NONE) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user