Always request the maximum number of backlog available
This commit is contained in:
parent
f4676ba5ff
commit
8217f141cf
|
@ -560,7 +560,7 @@ static int _new_server(AppServer * appserver, char const * app, int options)
|
|||
: INADDR_LOOPBACK);
|
||||
if(bind(fd, (struct sockaddr *)&sa, sizeof(sa)) == 0)
|
||||
{
|
||||
if(listen(fd, 5) == 0)
|
||||
if(listen(fd, SOMAXCONN) == 0)
|
||||
{
|
||||
event_register_io_read(appserver->event, fd,
|
||||
(EventIOFunc)_appserver_accept,
|
||||
|
|
|
@ -261,7 +261,7 @@ static int _init_server(TCP * tcp, char const * name)
|
|||
#ifdef DEBUG
|
||||
fprintf(stderr, "DEBUG: %s() %s\n", __func__, "listen()");
|
||||
#endif
|
||||
if(listen(tcp->u.server.fd, 5) != 0)
|
||||
if(listen(tcp->u.server.fd, SOMAXCONN) != 0)
|
||||
return -_tcp_error("listen", 1);
|
||||
event_register_io_read(tcp->helper->event, tcp->u.server.fd,
|
||||
(EventIOFunc)_tcp_callback_accept, tcp);
|
||||
|
|
Loading…
Reference in New Issue
Block a user