From: Stephan Bosch Date: Wed, 19 Aug 2020 22:17:49 +0000 (+0200) Subject: lib-http: http-client-connection - Use http_client_connection_is_active() to check... X-Git-Tag: 2.3.13~265 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ef4e71e5c2e64a982fcc326499900d1af6b90ec1;p=thirdparty%2Fdovecot%2Fcore.git lib-http: http-client-connection - Use http_client_connection_is_active() to check idle status. This makes the check shorter and easier to understand. --- diff --git a/src/lib-http/http-client-connection.c b/src/lib-http/http-client-connection.c index 3af2caae68..a60a05d7ed 100644 --- a/src/lib-http/http-client-connection.c +++ b/src/lib-http/http-client-connection.c @@ -522,10 +522,7 @@ void http_client_connection_check_idle(struct http_client_connection *conn) return; } - if (conn->connected && - array_is_created(&conn->request_wait_list) && - array_count(&conn->request_wait_list) == 0 && - !conn->in_req_callback && conn->incoming_payload == NULL) { + if (conn->connected && !http_client_connection_is_active(conn)) { struct http_client *client = peer->client; i_assert(conn->to_requests == NULL);