Compare commits
1 Commits
main
...
68fffacc59
| Author | SHA1 | Date | |
|---|---|---|---|
|
68fffacc59
|
@@ -46,15 +46,8 @@ mod server_only {
|
||||
let mut disconnected_client_ids = HashSet::new();
|
||||
let subscribed_clients = SUBSCRIBED_CLIENTS.read().await;
|
||||
for (id, client) in subscribed_clients.iter() {
|
||||
if client
|
||||
.websocket
|
||||
.lock()
|
||||
.await
|
||||
.send(UpdateEvent)
|
||||
.await
|
||||
.is_err()
|
||||
{
|
||||
disconnected_client_ids.insert(*id);
|
||||
if let Err(_) = client.websocket.lock().await.send(UpdateEvent).await {
|
||||
disconnected_client_ids.insert(id.clone());
|
||||
}
|
||||
}
|
||||
drop(subscribed_clients);
|
||||
|
||||
Reference in New Issue
Block a user