fix deadlock on client cache

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
This commit is contained in:
ゆめ 2024-10-17 12:39:04 -05:00
parent 5dd87bbccb
commit b0266202cf
No known key found for this signature in database

View file

@ -34,7 +34,11 @@ impl ClientCache {
) )
}); });
f(client.1.clone()).await // inner is ref-counted
let client_cloned = client.1.clone();
drop(client);
f(client_cloned).await
} }
pub fn gc(&self, dur: std::time::Duration) { pub fn gc(&self, dur: std::time::Duration) {