Fix race condition in shutdown of background task (#81)

This commit is contained in:
Jamie
2021-07-13 14:27:34 +02:00
committed by GitHub
parent b3926d40e3
commit ebe4e1f331
6 changed files with 61 additions and 34 deletions

View File

@@ -24,7 +24,9 @@ pub async fn main() -> mini_redis::Result<()> {
// Bind a TCP listener
let listener = TcpListener::bind(&format!("127.0.0.1:{}", port)).await?;
server::run(listener, signal::ctrl_c()).await
server::run(listener, signal::ctrl_c()).await;
Ok(())
}
#[derive(StructOpt, Debug)]