xC: don't abort on accept() failure
Just disable the relay.
This commit is contained in:
parent
e2f3fc2e79
commit
126105fa4f
10
xC.c
10
xC.c
@ -2910,14 +2910,18 @@ relay_try_fetch_client (struct app_context *ctx, int listen_fd)
|
|||||||
if (errno == EINTR)
|
if (errno == EINTR)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// TODO: Try to make sure these find their way to the global buffer.
|
||||||
if (accept_error_is_transient (errno))
|
if (accept_error_is_transient (errno))
|
||||||
|
{
|
||||||
print_warning ("%s: %s", "accept", strerror (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);
|
hard_assert (peer_len <= sizeof peer);
|
||||||
set_blocking (fd, false);
|
set_blocking (fd, false);
|
||||||
set_cloexec (fd);
|
set_cloexec (fd);
|
||||||
|
Loading…
Reference in New Issue
Block a user