mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-09 14:38:56 +01:00
add a warning to help us find when we forget to drop explicitely drop a permit
This commit is contained in:
parent
1b90e6ce5f
commit
241746e7f4
@ -49,6 +49,7 @@ impl Permit {
|
||||
|
||||
impl Drop for Permit {
|
||||
fn drop(&mut self) {
|
||||
tracing::warn!("Internal error, a search permit was lazily dropped. If you see this message, please open an issue on the meilisearch repository at <https://github.com/meilisearch/meilisearch/issues/new?template=bug_report.md&title=[INTERNAL%20ERROR]%20Meilisearch%20lazily%20dropped%20a%20search%20permit>");
|
||||
let sender = self.sender.clone();
|
||||
// if the channel is closed then the whole instance is down
|
||||
std::mem::drop(tokio::spawn(async move { sender.send(()).await }));
|
||||
|
Loading…
Reference in New Issue
Block a user