Merge in commit 73375c3 from upstream

Replace `peek()` with `available()` during connection status check to avoid losing messages.

Closes adafruit#22.
This commit is contained in:
ajs256
2021-03-04 17:32:51 -08:00
committed by GitHub
parent f2a0e601b2
commit d2726992d8

View File

@@ -177,8 +177,7 @@ void WiFiClient::stop()
uint8_t WiFiClient::connected() uint8_t WiFiClient::connected()
{ {
if (_socket != -1) { if (_socket != -1) {
// use peek to update socket state available();
peek();
} }
return (_socket != -1); return (_socket != -1);