[core] remove redundant check for max_conns

network_server_handle_fdevent() checks max_conns and is the only
callers of connection_accept(), so connection_accept() does not
need to repeat the check.
personal/stbuehler/tests-path
Glenn Strauss 2021-05-13 01:03:54 -04:00
parent 7b0bc1298a
commit c964568e25
1 changed files with 0 additions and 10 deletions

View File

@ -846,16 +846,6 @@ connection *connection_accept(server *srv, server_socket *srv_socket) {
sock_addr cnt_addr;
size_t cnt_len = sizeof(cnt_addr); /*(size_t intentional; not socklen_t)*/
/**
* check if we can still open a new connections
*
* see #1216
*/
if (srv->conns.used >= srv->max_conns) {
return NULL;
}
cnt = fdevent_accept_listenfd(srv_socket->fd, (struct sockaddr *) &cnt_addr, &cnt_len);
if (-1 == cnt) {
switch (errno) {