Skip to content

Commit 2ea6a4c

Browse files
committed
+fix: patch buggy esp8266 ota
1 parent 1493bce commit 2ea6a4c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

smartswitch.espxx/src/GithubOTA.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,13 @@ bool GithubOTA::doUpdate(String userAgent, void (*fnOTABegin)(void), void (*fnOT
153153
{
154154
String newUrl = http.getLocation();
155155
http.end();
156+
releaseWiFiClient(updateClient);
156157

157158
#if defined(ESP8266) // workaround, fetch firmware via ssl seems too havy for esp8266
158159
newUrl.replace("https://", "http://");
159160
#endif
160161
DEBUGF("redirect asset url %d %s\n", httpCode, newUrl.c_str());
162+
updateClient = newWiFiClient(newUrl);
161163
http.begin(*updateClient, newUrl);
162164
httpCode = http.GET();
163165

0 commit comments

Comments
 (0)