diff --git a/Cargo.toml b/Cargo.toml index 3415485..94aeee8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "discoursio-presence" -version = "0.2.8" +version = "0.2.11" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/main.rs b/src/main.rs index ad2c2f9..217ee13 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,8 +41,9 @@ async fn connect_handler( })?; let (tx, mut rx) = broadcast::channel(100); + let state_clone = state.clone(); let handle = tokio::spawn(async move { - let conn = state.redis.get_async_connection().await.unwrap(); + let conn = state_clone.redis.get_async_connection().await.unwrap(); let mut pubsub = conn.into_pubsub(); pubsub.subscribe("new_follower").await.unwrap();