Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adapts the lingering close mechanism to the new events system.

  • Loading branch information...
commit 0c4d1e5772567ccd92f0d11495b44f84946c7735 1 parent 5be7419
Alvaro Lopez Ortega alobbs authored
Showing with 6 additions and 1 deletion.
  1. +3 −0  cherokee/connection.c
  2. +3 −1 cherokee/thread.c
3  cherokee/connection.c
View
@@ -1567,6 +1567,9 @@ cherokee_connection_linger_read (cherokee_connection_t *conn)
return ret_error;
case ret_eagain:
TRACE (ENTRIES",linger", "read %u, eagain\n", cnt_read);
+
+ conn->polling_aim.fd = conn->socket.socket;
+ conn->polling_aim.mode = poll_mode_read;
return ret_eagain;
case ret_ok:
TRACE (ENTRIES",linger", "%u bytes tossed away\n", cnt_read);
4 cherokee/thread.c
View
@@ -492,7 +492,7 @@ process_polling_connections (cherokee_thread_t *thd)
/* Most likely a 'Gateway Timeout'
*/
if ((conn->phase >= phase_processing_header) ||
- (conn->phase == phase_reading_header) && (conn->incoming_header.len >= 1))
+ ((conn->phase == phase_reading_header) && (conn->incoming_header.len >= 1)))
{
/* Push a hardcoded error
*/
@@ -1343,7 +1343,9 @@ process_active_connections (cherokee_thread_t *thd)
ret = cherokee_connection_linger_read (conn);
switch (ret) {
case ret_ok:
+ continue;
case ret_eagain:
+ cherokee_thread_deactive_to_polling (thd, conn);
continue;
case ret_eof:
case ret_error:
Please sign in to comment.
Something went wrong with that request. Please try again.