Skip to content

Commit 7151265

Browse files
committed
WiFiClient: use Stream::_timeout for write operations
1 parent eebcc65 commit 7151265

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libraries/ESP8266WiFi/src/WiFiClient.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ size_t WiFiClient::write(const uint8_t *buf, size_t size)
163163
{
164164
return 0;
165165
}
166+
_client->setTimeout(_timeout);
166167
return _client->write(buf, size);
167168
}
168169

@@ -178,6 +179,7 @@ size_t WiFiClient::write(Stream& stream)
178179
{
179180
return 0;
180181
}
182+
_client->setTimeout(_timeout);
181183
return _client->write(stream);
182184
}
183185

@@ -187,6 +189,7 @@ size_t WiFiClient::write_P(PGM_P buf, size_t size)
187189
{
188190
return 0;
189191
}
192+
_client->setTimeout(_timeout);
190193
return _client->write_P(buf, size);
191194
}
192195

0 commit comments

Comments
 (0)