Permalink
Browse files

This branch should make the "pending read number" unnecessary.

Hopefully this does not introduce any regression in the SSL support.
  • Loading branch information...
1 parent 78f32a0 commit 7218c3439c235f33220916f51eaaa5df24b1aaa1 @alobbs alobbs committed Dec 30, 2011
Showing with 0 additions and 45 deletions.
  1. +0 −4 cherokee/connection.c
  2. +0 −19 cherokee/socket.c
  3. +0 −1 cherokee/socket.h
  4. +0 −20 cherokee/thread.c
  5. +0 −1 cherokee/thread.h
@@ -1194,10 +1194,6 @@ cherokee_connection_recv (cherokee_connection_t *conn,
return ret;
case ret_eagain:
- if (cherokee_socket_pending_read (&conn->socket)) {
- CONN_THREAD(conn)->pending_read_num += 1;
- }
-
if (cnt_read > 0) {
cherokee_connection_rx_add (conn, cnt_read);
*len = cnt_read;
View
@@ -822,25 +822,6 @@ cherokee_socket_read (cherokee_socket_t *socket,
}
-int
-cherokee_socket_pending_read (cherokee_socket_t *socket)
-{
- if (socket->is_tls != TLS)
- return 0;
-
- if (unlikely ((socket->status != socket_reading) &&
- (socket->status != socket_writing)))
- return 0;
-
- if (socket->cryptor != NULL) {
- return cherokee_cryptor_socket_pending (socket->cryptor);
- }
-
- SHOULDNT_HAPPEN;
- return 0;
-}
-
-
ret_t
cherokee_socket_flush (cherokee_socket_t *socket)
{
View
@@ -122,7 +122,6 @@ ret_t cherokee_socket_shutdown (cherokee_socket_t *socket, int how);
ret_t cherokee_socket_reset (cherokee_socket_t *socket);
ret_t cherokee_socket_accept (cherokee_socket_t *socket, cherokee_socket_t *server_socket);
ret_t cherokee_socket_accept_fd (cherokee_socket_t *socket, int *new_fd, cherokee_sockaddr_t *sa);
-int cherokee_socket_pending_read (cherokee_socket_t *socket);
ret_t cherokee_socket_flush (cherokee_socket_t *socket);
ret_t cherokee_socket_test_read (cherokee_socket_t *socket);
View
@@ -166,7 +166,6 @@ cherokee_thread_new (cherokee_thread_t **thd,
n->reuse_list_num = 0;
n->pending_conns_num = 0;
- n->pending_read_num = 0;
n->fastcgi_servers = NULL;
n->fastcgi_free_func = NULL;
@@ -729,13 +728,6 @@ process_active_connections (cherokee_thread_t *thd)
case ret_ok:
TRACE(ENTRIES, "Handshake %s\n", "finished");
- /* The client might have sent the request on the same
- * package as the last piece of the handshake. Thus,
- * the server shouldn't stop on fdpoll->watch(), the
- * connection is marked as ready as well.
- */
- thd->pending_read_num++;
-
/* Set mode and update timeout
*/
conn_set_mode (thd, conn, socket_reading);
@@ -1716,18 +1708,12 @@ cherokee_thread_step_SINGLE_THREAD (cherokee_thread_t *thd)
/* Be quick when there are pending work:
* - pending_conns_num: Pipelined requests
- * - pending_read_num: SSL pending reads
*/
if (thd->pending_conns_num > 0) {
fdwatch_msecs = 0;
thd->pending_conns_num = 0;
}
- if (thd->pending_read_num > 0) {
- fdwatch_msecs = 0;
- thd->pending_read_num = 0;
- }
-
if (! cherokee_list_empty (&thd->active_list)) {
fdwatch_msecs = 0;
}
@@ -1907,18 +1893,12 @@ cherokee_thread_step_MULTI_THREAD (cherokee_thread_t *thd,
/* Be quick when there are pending work:
* - pending_conns_num: Pipelined requests
- * - pending_read_num: SSL pending reads
*/
if (thd->pending_conns_num > 0) {
fdwatch_msecs = 0;
thd->pending_conns_num = 0;
}
- if (thd->pending_read_num > 0) {
- fdwatch_msecs = 0;
- thd->pending_read_num = 0;
- }
-
if (! cherokee_list_empty (&thd->active_list)) {
fdwatch_msecs = 0;
}
View
@@ -84,7 +84,6 @@ typedef struct {
cherokee_boolean_t is_full;
int pending_conns_num; /* Waiting pipelining connections */
- int pending_read_num; /* Conns with SSL deping read */
cherokee_avl_t *fastcgi_servers;
cherokee_func_free_t fastcgi_free_func;

0 comments on commit 7218c34

Please sign in to comment.