Skip to content

Commit 4878d5c

Browse files
committed
WiFi: partially fix flush() behaviour
We still need to check if trasmission is completed, BTW this commit should alleviate bugs involving data loss. See #4029
1 parent 934475b commit 4878d5c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

libraries/WiFi/src/WiFiClient.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ int WiFiClient::peek() {
140140
}
141141

142142
void WiFiClient::flush() {
143-
while (available())
144-
read();
143+
// TODO: a real check to ensure transmission has been completed
145144
}
146145

147146
void WiFiClient::stop() {

libraries/WiFi/src/WiFiUdp.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,7 @@ int WiFiUDP::peek()
155155

156156
void WiFiUDP::flush()
157157
{
158-
while (available())
159-
read();
158+
// TODO: a real check to ensure transmission has been completed
160159
}
161160

162161
IPAddress WiFiUDP::remoteIP()

0 commit comments

Comments
 (0)