Unverified Commit c6646e8c authored by Lucas Saavedra Vaz's avatar Lucas Saavedra Vaz Committed by GitHub

WiFiClient - Properly initialize and check _rxBuffer (#8699)

parent 02e31b40
......@@ -182,7 +182,7 @@ public:
}
};
WiFiClient::WiFiClient():_connected(false),_timeout(WIFI_CLIENT_DEF_CONN_TIMEOUT_MS),next(NULL)
WiFiClient::WiFiClient():_rxBuffer(nullptr),_connected(false),_timeout(WIFI_CLIENT_DEF_CONN_TIMEOUT_MS),next(NULL)
{
}
......@@ -508,7 +508,9 @@ int WiFiClient::available()
// Though flushing means to send all pending data,
// seems that in Arduino it also means to clear RX
void WiFiClient::flush() {
if (_rxBuffer != nullptr) {
_rxBuffer->flush();
}
}
uint8_t WiFiClient::connected()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment