Skip to content

Commit 2409695

Browse files
committed
OTA: STM32H7 check for client connected during fetch
1 parent 6c1b95b commit 2409695

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()) {
97102
http_res = http_client->read(context->buffer, context->buf_len);
98103

0 commit comments

Comments
 (0)