Skip to content

Commit ff3e851

Browse files
simensrostadrlubos
authored andcommitted
net: lib: downloader: Remove error check
Make sure errors are forwarded to the application if reconnection fails. Signed-off-by: Simen S. Røstad <[email protected]> (cherry picked from commit f7406fd)
1 parent c5e881b commit ff3e851

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

subsys/net/lib/downloader/src/downloader.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -305,14 +305,10 @@ void download_thread(void *cli, void *a, void *b)
305305
}
306306

307307
LOG_ERR("Failed to reconnect, err %d", rc2);
308-
if (rc == -ECONNRESET) {
309-
/* We haven't sent the error before in this case,
310-
* so we do it now.
311-
*/
312-
rc2 = error_evt_send(dl, rc);
313-
if (rc2 == 0 && is_state(dl, DOWNLOADER_DOWNLOADING)) {
314-
goto reconnect;
315-
}
308+
309+
rc2 = error_evt_send(dl, rc2);
310+
if (rc2 == 0 && is_state(dl, DOWNLOADER_DOWNLOADING)) {
311+
goto reconnect;
316312
}
317313

318314
transport_close(dl);

0 commit comments

Comments
 (0)