Commit bff9f0b6 authored by Jeroen88's avatar Jeroen88 Committed by Me No Dev

Fix error in PR #2048: if ::available() is called before ::connect() _rxBuffer...

Fix error in PR #2048: if ::available() is called before ::connect() _rxBuffer is not initialised (#2155)
parent 72803703
...@@ -398,6 +398,10 @@ int WiFiClient::peek() ...@@ -398,6 +398,10 @@ int WiFiClient::peek()
int WiFiClient::available() int WiFiClient::available()
{ {
if(!_rxBuffer)
{
return 0;
}
int res = _rxBuffer->available(); int res = _rxBuffer->available();
if(_rxBuffer->failed()) { if(_rxBuffer->failed()) {
log_e("%d", errno); log_e("%d", errno);
......
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