Skip to content

Commit

Permalink
Tolerate EADDRNOTAVAIL at server startup
Browse files Browse the repository at this point in the history
  • Loading branch information
SimulPiscator committed Nov 19, 2023
1 parent 51c972e commit c401643
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/httpserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ struct HttpServer::Private
pfds[0].events = POLLIN;
for (auto& address : addresses) {
int sockfd = createListeningSocket(address);
if (sockfd < 0)
if (sockfd < 0 && errno != EADDRNOTAVAIL) // may occur due to race condition at network reconfiguration
err = errno;
else {
struct pollfd pfd = { sockfd, POLLIN, 0 };
Expand Down

0 comments on commit c401643

Please sign in to comment.