Skip to content

Commit b1690f1

Browse files
committed
Fix failure to close listening socket (#3678).
1 parent d53f8fe commit b1690f1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

components/modules/net.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -351,11 +351,11 @@ void handle_dns_event(task_param_t param, task_prio_t prio)
351351

352352

353353
static err_t netconn_close_and_delete(struct netconn *conn) {
354-
err_t err = netconn_close(conn);
355-
if (err == ERR_OK)
356-
netconn_delete(conn);
357-
358-
return err;
354+
// netconn_close() no longer returns valid return codes, as the code
355+
// path we get in the IDF ends up using uninitialised memory.
356+
netconn_close(conn);
357+
netconn_delete(conn);
358+
return ERR_OK;
359359
}
360360

361361

0 commit comments

Comments
 (0)