disconnect-handler2

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

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