fix(redis): fix recreation on redis connection pool (#1063)

This commit is contained in:
Nishant Joshi
2023-05-08 14:31:49 +05:30
committed by GitHub
parent 3131bc84af
commit 982c27fce7
7 changed files with 31 additions and 13 deletions

View File

@ -156,6 +156,7 @@ impl RedisConnectionPool {
}
impl Drop for RedisConnectionPool {
// safety: panics when invoked without a current tokio runtime
fn drop(&mut self) {
let rt = tokio::runtime::Handle::current();
rt.block_on(self.close_connections())