Fix close_timeout_ts trigger (should finally fix lingering close)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2645 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.24
Stefan Bühler 14 years ago
parent 915a9e3e88
commit 20c4cd55c3

@ -52,6 +52,7 @@ NEWS
* mod_accesslog: configurable timestamp logging (fixes #1479)
* always define _GNU_SOURCE
* Add some iterators for mod_magnet (fixes #1307)
* Fix close_timeout_ts trigger (should finally fix lingering close)
- 1.4.23 - 2009-06-19
* Added some extra warning options in cmake and fix the resulting warnings (unused/static functions)

@ -1183,7 +1183,7 @@ static handler_t connection_handle_fdevent(void *s, void *context, int revents)
/* FIXME: revents = 0x19 still means that we should read from the queue */
if (revents & FDEVENT_HUP) {
if (con->state == CON_STATE_CLOSE) {
con->close_timeout_ts = srv->cur_ts - 2;
con->close_timeout_ts = srv->cur_ts - (HTTP_LINGER_TIMEOUT+1);
} else {
/* sigio reports the wrong event here
*
@ -1625,7 +1625,7 @@ int connection_state_machine(server *srv, connection *con) {
*/
}
if (srv->cur_ts - con->close_timeout_ts > 30) {
if (srv->cur_ts - con->close_timeout_ts > HTTP_LINGER_TIMEOUT) {
connection_close(srv, con);
if (srv->srvconf.log_state_handling) {

@ -40,6 +40,7 @@ typedef enum { HANDLER_UNSET,
HANDLER_WAIT_FOR_FD
} handler_t;
#define HTTP_LINGER_TIMEOUT 30
/* we use it in a enum */
#ifdef TRUE

Loading…
Cancel
Save