fix: impl Drop for RedisConnectionPool (#1051)

This commit is contained in:
Kartikeya Hegde
2023-05-04 19:31:33 +05:30
committed by GitHub
parent e5cc0d9d45
commit 3d05e50abc
8 changed files with 14 additions and 40 deletions

View File

@ -39,13 +39,11 @@ async fn main() -> ApplicationResult<()> {
logger::info!("Application started [{:?}] [{:?}]", conf.server, conf.log);
#[allow(clippy::expect_used)]
let (server, mut state) = router::start_server(conf)
let server = router::start_server(conf)
.await
.expect("Failed to create the server");
let _ = server.await;
state.store.close().await;
Err(ApplicationError::from(std::io::Error::new(
std::io::ErrorKind::Other,
"Server shut down",