Skip to content
4 changes: 4 additions & 0 deletions libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,10 @@ bool HTTPClient::connect(void)
{
if(_reuse && _canReuse && connected()) {
DEBUG_HTTPCLIENT("[HTTP-Client] connect: already connected, reusing connection\n");

#if defined(NO_GLOBAL_INSTANCES)
StreamNull devnull;
#endif
_client->sendAvailable(devnull); // clear _client's output (all of it, no timeout)
return true;
}
Expand Down