mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
fix connection reset by peer case (#4626)
* fix connection reset by peer case where pcb is set to null in ClientContext::_error but not reported to WiFiClient * ClientContext: rename functions *_sent to *_acked (:sent to :ack in debug) * use nullptr instead of 0
This commit is contained in:
@ -280,7 +280,7 @@ void WiFiClient::stop()
|
||||
|
||||
uint8_t WiFiClient::connected()
|
||||
{
|
||||
if (!_client)
|
||||
if (!_client || _client->state() == CLOSED)
|
||||
return 0;
|
||||
|
||||
return _client->state() == ESTABLISHED || available();
|
||||
|
Reference in New Issue
Block a user