Skip to content

Commit 169e60b

Browse files
committed
fix connection reset by peer case where pcb is set to null in ClientContext::_error but not reported to WiFiClient
1 parent 2315ac2 commit 169e60b

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
@@ -280,7 +280,7 @@ void WiFiClient::stop()
280280

281281
uint8_t WiFiClient::connected()
282282
{
283-
if (!_client)
283+
if (!_client || _client->state() == CLOSED)
284284
return 0;
285285

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

0 commit comments

Comments
 (0)