increase listen queue for http sockets to 128

svn:r669
This commit is contained in:
Niels Provos 2008-02-26 03:49:00 +00:00
parent 960be58869
commit 7470ce52c5
2 changed files with 2 additions and 1 deletions

View File

@ -50,6 +50,7 @@ Changes in current version:
o add support for PUT/DELETE requests; from Josh Rotenberg o add support for PUT/DELETE requests; from Josh Rotenberg
o introduce evhttp_accept_socket() to accept from an already created socket o introduce evhttp_accept_socket() to accept from an already created socket
o include Content-Length in reply for HTTP/1.0 requests with keep-alive o include Content-Length in reply for HTTP/1.0 requests with keep-alive
o increase listen queue for http sockets to 128; if that is not enough the evhttp_accpet_socket() api can be used with a prepared socket.
Changes in 1.4.0: Changes in 1.4.0:

2
http.c
View File

@ -2018,7 +2018,7 @@ evhttp_bind_socket(struct evhttp *http, const char *address, u_short port)
if ((fd = bind_socket(address, port)) == -1) if ((fd = bind_socket(address, port)) == -1)
return (-1); return (-1);
if (listen(fd, 10) == -1) { if (listen(fd, 128) == -1) {
event_warn("%s: listen", __func__); event_warn("%s: listen", __func__);
EVUTIL_CLOSESOCKET(fd); EVUTIL_CLOSESOCKET(fd);
return (-1); return (-1);