mirror of
https://git.wownero.com/wownero/wownero-puddle.git
synced 2024-08-15 01:03:20 +00:00
remove FD_SETSIZE check
This commit is contained in:
parent
b790700c32
commit
bea8068bd9
1 changed files with 8 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue