From: Stephan Bosch Date: Sun, 19 Jun 2016 20:35:43 +0000 (+0200) Subject: lib-http: server: Added more detailed debugging about when idle timeouts are started... X-Git-Tag: 2.2.25.rc1~104 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5ecd956aab342ffd67a9439f6c8be643592fa996;p=thirdparty%2Fdovecot%2Fcore.git lib-http: server: Added more detailed debugging about when idle timeouts are started/stopped. --- diff --git a/src/lib-http/http-server-connection.c b/src/lib-http/http-server-connection.c index be3d39055e..5ecd6b4a1c 100644 --- a/src/lib-http/http-server-connection.c +++ b/src/lib-http/http-server-connection.c @@ -811,15 +811,20 @@ http_server_connection_next_response(struct http_server_connection *conn) req = conn->request_queue_head; if (req == NULL) { /* no requests pending */ + http_server_connection_debug(conn, "No more requests pending"); http_server_connection_timeout_start(conn); return FALSE; } if (req->state < HTTP_SERVER_REQUEST_STATE_READY_TO_RESPOND) { if (req->state == HTTP_SERVER_REQUEST_STATE_PROCESSING) { /* server is causing idle time */ + http_server_connection_debug(conn, + "Not ready to respond: Server is processing"); http_server_connection_timeout_stop(conn); } else { /* client is causing idle time */ + http_server_connection_debug(conn, + "Not ready to respond: Waiting for client"); http_server_connection_timeout_start(conn); } @@ -852,6 +857,8 @@ http_server_connection_next_response(struct http_server_connection *conn) i_assert(req->state == HTTP_SERVER_REQUEST_STATE_READY_TO_RESPOND && req->response != NULL); + http_server_connection_debug(conn, + "Sending response"); http_server_connection_timeout_start(conn); http_server_request_ref(req); @@ -940,9 +947,15 @@ int http_server_connection_output(struct http_server_connection *conn) return -1; } else if (conn->io_resp_payload != NULL) { /* server is causing idle time */ + http_server_connection_debug(conn, + "Not ready to continue response: " + "Server is producing response"); http_server_connection_timeout_stop(conn); } else { /* client is causing idle time */ + http_server_connection_debug(conn, + "Not ready to continue response: " + "Waiting for client"); http_server_connection_timeout_start(conn); } }