提交 e3a5ae43 编写于 作者: H h3ndrik 提交者: Me No Dev

clean up faster (fixes #828) (#1087)

flush tcp buffer instead of reading it byte by byte.
上级 494ff217
......@@ -232,9 +232,7 @@ void HTTPClient::end(void)
if(connected()) {
if(_tcp->available() > 0) {
log_d("still data in buffer (%d), clean up.", _tcp->available());
while(_tcp->available() > 0) {
_tcp->read();
}
_tcp->flush();
}
if(_reuse && _canReuse) {
log_d("tcp keep open for reuse");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册