forked from espressif/arduino-esp32
fixed http.end taking too long (#6277)
http end takes 20-30 seconds if there is a large amount of data replacing this read loop with flush fixes that problem
This commit is contained in:
@ -386,9 +386,7 @@ void HTTPClient::disconnect(bool preserveClient)
|
|||||||
if(connected()) {
|
if(connected()) {
|
||||||
if(_client->available() > 0) {
|
if(_client->available() > 0) {
|
||||||
log_d("still data in buffer (%d), clean up.\n", _client->available());
|
log_d("still data in buffer (%d), clean up.\n", _client->available());
|
||||||
while(_client->available() > 0) {
|
_client->flush();
|
||||||
_client->read();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_reuse && _canReuse) {
|
if(_reuse && _canReuse) {
|
||||||
|
Reference in New Issue
Block a user