Skip to content

Commit f8b577b

Browse files
d-a-vdevyte
authored andcommitted
fix WiFiClient::availableForWrite() with no connexion (#3985)
fix #3983
1 parent 08cdf15 commit f8b577b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/ESP8266WiFi/src/WiFiClient.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ bool WiFiClient::getNoDelay() {
156156

157157
size_t WiFiClient::availableForWrite ()
158158
{
159-
return _client->availableForWrite();
159+
return _client? _client->availableForWrite(): 0;
160160
}
161161

162162
size_t WiFiClient::write(uint8_t b)

0 commit comments

Comments
 (0)