fix: stats page "active user streams"
This commit is contained in:
parent
07f5ebf8e7
commit
11b01b1b82
1 changed files with 2 additions and 2 deletions
|
@ -524,14 +524,14 @@ pub async fn handle_socket(socket: WebSocket, db: DataManager, user_id: String,
|
|||
}
|
||||
});
|
||||
|
||||
db.2.incr("atto.active_connections:user".to_string()).await;
|
||||
db.2.incr("atto.active_connections:users".to_string()).await;
|
||||
tokio::select! {
|
||||
_ = (&mut recv_task) => redis_task.abort(),
|
||||
_ = (&mut redis_task) => recv_task.abort()
|
||||
}
|
||||
|
||||
heartbeat_task.abort(); // kill
|
||||
db.2.decr("atto.active_connections:user".to_string()).await;
|
||||
db.2.decr("atto.active_connections:users".to_string()).await;
|
||||
tracing::info!("socket terminate");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue