Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e3a5ae4

Browse filesBrowse files
h3ndrikme-no-dev
authored andcommitted
clean up faster (fixes espressif#828) (espressif#1087)
flush tcp buffer instead of reading it byte by byte.
1 parent 494ff21 commit e3a5ae4
Copy full SHA for e3a5ae4

File tree

Expand file treeCollapse file tree

1 file changed

+1
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-3
lines changed

‎libraries/HTTPClient/src/HTTPClient.cpp

Copy file name to clipboardExpand all lines: libraries/HTTPClient/src/HTTPClient.cpp
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,7 @@ void HTTPClient::end(void)
232232
if(connected()) {
233233
if(_tcp->available() > 0) {
234234
log_d("still data in buffer (%d), clean up.", _tcp->available());
235-
while(_tcp->available() > 0) {
236-
_tcp->read();
237-
}
235+
_tcp->flush();
238236
}
239237
if(_reuse && _canReuse) {
240238
log_d("tcp keep open for reuse");

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.