MFC r281163: Make ctld to not exit on ECONNABORTED on accept().

That is not really an error for the main process.
This commit is contained in:
mav 2015-04-13 09:18:56 +00:00
parent a76136eb76
commit 66d912b92f

View File

@ -2382,8 +2382,11 @@ main_loop(struct conf *conf, bool dont_fork)
client_fd = accept(portal->p_socket, client_fd = accept(portal->p_socket,
(struct sockaddr *)&client_sa, (struct sockaddr *)&client_sa,
&client_salen); &client_salen);
if (client_fd < 0) if (client_fd < 0) {
if (errno == ECONNABORTED)
continue;
log_err(1, "accept"); log_err(1, "accept");
}
assert(client_salen >= client_sa.ss_len); assert(client_salen >= client_sa.ss_len);
handle_connection(portal, client_fd, handle_connection(portal, client_fd,