mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
removed linger from http server socket; reported by Ilya Martynov
svn:r604
This commit is contained in:
parent
d4bdbca847
commit
fdafb66bb5
@ -28,6 +28,7 @@ Changes in current version:
|
||||
o restructure the code to make event activation independent of regular event logic
|
||||
o Correctly handle DNS replies with no answers set (Fixes bug 1846282)
|
||||
o add -Wstrict-aliasing to warnings and more cleanup
|
||||
o removed linger from http server socket; reported by Ilya Martynov
|
||||
|
||||
Changes in 1.4.0:
|
||||
o allow \r or \n individually to separate HTTP headers instead of the standard "\r\n"; from Charles Kerr.
|
||||
|
4
http.c
4
http.c
@ -2371,7 +2371,6 @@ name_from_addr(struct sockaddr *sa, socklen_t salen,
|
||||
static evutil_socket_t
|
||||
bind_socket_ai(struct addrinfo *ai)
|
||||
{
|
||||
struct linger linger;
|
||||
evutil_socket_t fd;
|
||||
|
||||
int on = 1, r;
|
||||
@ -2396,9 +2395,6 @@ bind_socket_ai(struct addrinfo *ai)
|
||||
|
||||
setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (void *)&on, sizeof(on));
|
||||
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (void *)&on, sizeof(on));
|
||||
linger.l_onoff = 1;
|
||||
linger.l_linger = 5;
|
||||
setsockopt(fd, SOL_SOCKET, SO_LINGER, (void *)&linger, sizeof(linger));
|
||||
|
||||
r = bind(fd, ai->ai_addr, ai->ai_addrlen);
|
||||
if (r == -1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user