mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-09-25 22:29:45 +00:00
Close concurrent call accesses
This commit is contained in:
@@ -573,7 +573,9 @@ pub fn disconnect_user_from_all_sockets(user_id: &UserID) -> Res {
|
||||
/// Do something with all active connections
|
||||
pub fn foreach_connection<F>(mut f: F) -> Res
|
||||
where F: FnMut(&UserWsConnection) -> Res {
|
||||
for conn in get_ws_connections_list().lock().unwrap().iter() {
|
||||
let list = get_ws_connections_list().lock().unwrap().clone();
|
||||
|
||||
for conn in list.iter() {
|
||||
f(conn)?;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user