diff --git a/src/doveadm/client-connection-http.c b/src/doveadm/client-connection-http.c index 9731aa0410..aac00c3c91 100644 --- a/src/doveadm/client-connection-http.c +++ b/src/doveadm/client-connection-http.c @@ -116,6 +116,18 @@ static struct doveadm_http_server_mount doveadm_http_server_mounts[] = { static void doveadm_http_server_send_response(void *context); +void client_connection_destroy_http(struct client_connection *conn) +{ + struct client_connection_http *hconn = + (struct client_connection_http *)conn; + + if (hconn->http_client != NULL) { + /* We're not in the lib-http/server's connection destroy callback. */ + http_server_connection_close(&hconn->http_client, + "Server shutting down"); + } +} + struct client_connection * client_connection_http_create(int fd, bool ssl) { @@ -137,18 +149,6 @@ client_connection_http_create(int fd, bool ssl) return &conn->conn; } -void client_connection_destroy_http(struct client_connection *conn) -{ - struct client_connection_http *hconn = - (struct client_connection_http *)conn; - - if (hconn->http_client != NULL) { - /* We're not in the lib-http/server's connection destroy callback. */ - http_server_connection_close(&hconn->http_client, - "Server shutting down"); - } -} - static void doveadm_http_server_connection_destroy(void *context, const char *reason ATTR_UNUSED)