Skip to content
Next Next commit
Create devnull static if needed
  • Loading branch information
paulocsanz committed Jun 27, 2021
commit ccccd4e6311875747f21a8f0b1c4b2c2c9c85655
4 changes: 4 additions & 0 deletions libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,10 @@ bool HTTPClient::hasHeader(const char* name)
*/
bool HTTPClient::connect(void)
{
#if defined(NO_GLOBAL_INSTANCES)
StreamNull devnull;
#endif

if(_reuse && _canReuse && connected()) {
DEBUG_HTTPCLIENT("[HTTP-Client] connect: already connected, reusing connection\n");
_client->sendAvailable(devnull); // clear _client's output (all of it, no timeout)
Expand Down