ota.cpp: stream timeout changed
This commit is contained in:
parent
4a9db7a4c0
commit
f2513584e2
@ -142,6 +142,8 @@ bool do_ota_update() {
|
|||||||
String prevHost = currentHost;
|
String prevHost = currentHost;
|
||||||
|
|
||||||
WiFiClientSecure client;
|
WiFiClientSecure client;
|
||||||
|
// set server connection timeout and open server connection
|
||||||
|
client.setTimeout(RESPONSE_TIMEOUT_MS);
|
||||||
client.setCACert(bintray.getCertificate(currentHost));
|
client.setCACert(bintray.getCertificate(currentHost));
|
||||||
|
|
||||||
if (!client.connect(currentHost.c_str(), port)) {
|
if (!client.connect(currentHost.c_str(), port)) {
|
||||||
@ -253,9 +255,6 @@ bool do_ota_update() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
display(4, "**", "writing...");
|
display(4, "**", "writing...");
|
||||||
|
|
||||||
// set server connection timeout and open server connection
|
|
||||||
client.setTimeout(RESPONSE_TIMEOUT_MS);
|
|
||||||
written = Update.writeStream(client);
|
written = Update.writeStream(client);
|
||||||
|
|
||||||
if (written == contentLength) {
|
if (written == contentLength) {
|
||||||
|
Loading…
Reference in New Issue
Block a user