Skip to content

Commit a679d2c

Browse files
Jowllelasmellby
authored andcommitted
net: http_server: No Error ENETDOWN
Set Log Level to Info when the HTTP socket reports ENETDOWN, instead of logging an error each time the network is down. Signed-off-by: Joel Schaller <[email protected]> (cherry picked from commit f22899e) Upstream-status: available
1 parent 0179ff4 commit a679d2c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

subsys/net/lib/http/http_server_core.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,9 +612,14 @@ static int http_server_run(struct http_server_ctx *ctx)
612612
continue;
613613
}
614614

615-
/* Listening socket error, abort. */
616-
LOG_ERR("Listening socket error, aborting.");
617615
ret = -sock_error;
616+
617+
if (ret == -ENETDOWN) {
618+
LOG_INF("Network is down");
619+
} else {
620+
LOG_ERR("Listening socket error, aborting. (%d)", ret);
621+
}
622+
618623
goto closing;
619624

620625
}

0 commit comments

Comments
 (0)