xC: don't abort on accept() failure

Just disable the relay.
This commit is contained in:
Přemysl Eric Janouch 2022-09-17 00:00:52 +02:00
parent e2f3fc2e79
commit 126105fa4f
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 8 additions and 4 deletions

12
xC.c
View File

@ -2910,12 +2910,16 @@ relay_try_fetch_client (struct app_context *ctx, int listen_fd)
if (errno == EINTR)
return true;
// TODO: Try to make sure these find their way to the global buffer.
if (accept_error_is_transient (errno))
{
print_warning ("%s: %s", "accept", strerror (errno));
else
// TODO: Rather dispose of the listening socket.
print_fatal ("%s: %s", "accept", strerror (errno));
return true;
return true;
}
print_error ("%s: %s", "accept", strerror (errno));
app_context_relay_stop (ctx);
return false;
}
hard_assert (peer_len <= sizeof peer);