mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
explicitely drop the search permit
This commit is contained in:
parent
42e7499260
commit
92b151607c
5 changed files with 36 additions and 4 deletions
|
@ -39,7 +39,7 @@ pub async fn multi_search_with_post(
|
|||
) -> Result<HttpResponse, ResponseError> {
|
||||
// Since we don't want to process half of the search requests and then get a permit refused
|
||||
// we're going to get one permit for the whole duration of the multi-search request.
|
||||
let _permit = search_queue.try_get_search_permit().await?;
|
||||
let permit = search_queue.try_get_search_permit().await?;
|
||||
|
||||
let federated_search = params.into_inner();
|
||||
|
||||
|
@ -162,6 +162,7 @@ pub async fn multi_search_with_post(
|
|||
HttpResponse::Ok().json(SearchResults { results: search_results })
|
||||
}
|
||||
};
|
||||
permit.drop().await;
|
||||
|
||||
Ok(response)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue