1
0
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:
david gauchard
2018-04-12 03:25:04 +02:00
committed by Develo
parent 4305275f8d
commit b08d282673
2 changed files with 9 additions and 9 deletions

View File

@ -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();