Skip to content

Commit efef6b6

Browse files
committed
fix WiFiClient::availableForWrite() with no connexion
fix esp8266#3983
1 parent 26980b3 commit efef6b6

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)