Bugfix/esp8266 http client#5232
Bugfix/esp8266 http client#5232Jeroen88 wants to merge 5 commits intoesp8266:masterfrom Jeroen88:bugfix/ESP8266HTTPClient
Conversation
…ject on the heap in stead of stack
|
@earlephilhower The current version of the library does not handle Connections that may be reused correctly. If the programmer calls end() directly, the connection may be reused, so it should NOT be _client->stop() nor should _client = nullptr and also not _tcpDprecated.reset(nullptr)!!! If end() is called from begin() the connection should also not be closed, for the same reason. The only exception to this is when a changeover is made from the old api to the new or vice versa. However, just before destruction ~ESP8266HTTPClient() the connection should be _client->stop(), because now the connection will be definitely closed. In the previous versions the destructor took care of this, but not anymore because of the bugfix. |
Removed unnecessary code