Skip to content

Commit e219cb0

Browse files
committed
WiFiClient.connected() should return true if data are available
and the WiFiClient bool() operator too
1 parent bf4a435 commit e219cb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/ESP8266WiFi/src/WiFiClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ bool WiFiClient::stop(unsigned int maxWaitMs)
331331

332332
uint8_t WiFiClient::connected()
333333
{
334-
if (!_client || _client->state() == CLOSED)
334+
if (!_client)
335335
return 0;
336336

337337
return _client->state() == ESTABLISHED || available();

0 commit comments

Comments
 (0)