fix deadlock on client cache
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
This commit is contained in:
parent
5dd87bbccb
commit
b0266202cf
1 changed files with 5 additions and 1 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue