1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-23 08:45:22 +03:00

Resolved issue #3359 (#6969)

* Resolved issue #3359

Made severing connections optional as per the patch
in the issue.
Also fixed a minor spacing issue.

* Renamed sever to close and added information to readme

Also my editor automatically removed some odd whitespace at the
end of a few lines.
This commit is contained in:
Tim Stableford
2020-02-23 00:30:17 +00:00
committed by GitHub
parent bea64dfa69
commit 16319da63d
3 changed files with 20 additions and 7 deletions

8
libraries/ESP8266httpUpdate/src/ESP8266httpUpdate.h Normal file → Executable file
View File

@ -87,6 +87,11 @@ public:
_followRedirects = follow;
}
void closeConnectionsOnUpdate(bool sever)
{
_closeConnectionsOnUpdate = sever;
}
void setLedPin(int ledPin = -1, uint8_t ledOn = HIGH)
{
_ledPin = ledPin;
@ -146,12 +151,13 @@ protected:
// Set the error and potentially use a CB to notify the application
void _setLastError(int err) {
_lastError = err;
if (_cbError) {
if (_cbError) {
_cbError(err);
}
}
int _lastError;
bool _rebootOnUpdate = true;
bool _closeConnectionsOnUpdate = true;
private:
int _httpClientTimeout;
bool _followRedirects;