disconnect-handler2

This commit is contained in:
Tony Rewin 2023-10-06 18:07:24 +03:00
parent 531cbb4458
commit 47c88d2efb
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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();