mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-06 05:21:22 +03:00
ESP8266WiFi: made connected() return true if data is available
WiFiClient::connected() should return true if the connection is disconnected, but there is still data available. This is specified in the Arduino docs: http://www.arduino.cc/en/Reference/WiFiClientConnected
This commit is contained in:
parent
bd8e118aa9
commit
021b8b61e7
@ -197,7 +197,7 @@ uint8_t ICACHE_FLASH_ATTR WiFiClient::connected()
|
||||
if (!_client)
|
||||
return 0;
|
||||
|
||||
return _client->state() == ESTABLISHED;
|
||||
return _client->state() == ESTABLISHED || available();
|
||||
}
|
||||
|
||||
uint8_t ICACHE_FLASH_ATTR WiFiClient::status()
|
||||
|
Loading…
x
Reference in New Issue
Block a user