Skip to content

Commit e1280af

Browse files
committed
OTA: check for client connected during fetch
1 parent cf6593b commit e1280af

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ota/interface/OTAInterfaceDefault.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ OTACloudProcessInterface::State OTADefaultCloudProcessInterface::fetch() {
9393
uint32_t start = millis();
9494

9595
do {
96+
if(!http_client->connected()) {
97+
res = OtaDownloadFail;
98+
goto exit;
99+
}
100+
96101
if(http_client->available() == 0) {
97102
/* Avoid tight loop and allow yield */
98103
delay(1);

0 commit comments

Comments
 (0)