remove FD_SETSIZE check

This commit is contained in:
Jethro Grassie 2019-11-29 20:03:11 -05:00
parent b790700c32
commit bea8068bd9
No known key found for this signature in database
GPG key ID: DE8ED755616565BB

View file

@ -2586,13 +2586,8 @@ client_on_accept(evutil_socket_t listener, short event, void *arg)
if (fd < 0)
{
perror("accept");
return;
}
else if (fd > FD_SETSIZE)
{
close(fd);
}
else
{
struct bufferevent *bev;
evutil_make_socket_nonblocking(fd);
bev = bufferevent_socket_new(base, fd, BEV_OPT_CLOSE_ON_FREE);
@ -2600,7 +2595,6 @@ client_on_accept(evutil_socket_t listener, short event, void *arg)
bufferevent_setwatermark(bev, EV_READ, 0, MAX_LINE);
bufferevent_enable(bev, EV_READ|EV_WRITE);
client_add(fd, bev);
}
}
static void