disconnect-handler2
This commit is contained in:
parent
531cbb4458
commit
47c88d2efb
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "discoursio-presence"
|
name = "discoursio-presence"
|
||||||
version = "0.2.8"
|
version = "0.2.11"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
|
@ -41,8 +41,9 @@ async fn connect_handler(
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
let (tx, mut rx) = broadcast::channel(100);
|
let (tx, mut rx) = broadcast::channel(100);
|
||||||
|
let state_clone = state.clone();
|
||||||
let handle = tokio::spawn(async move {
|
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();
|
let mut pubsub = conn.into_pubsub();
|
||||||
|
|
||||||
pubsub.subscribe("new_follower").await.unwrap();
|
pubsub.subscribe("new_follower").await.unwrap();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user