Implement disconnect specific client ID

This commit is contained in:
2025-02-11 22:03:16 +01:00
parent b8a8e14f3c
commit bb1e412d36
2 changed files with 14 additions and 2 deletions

View File

@@ -138,7 +138,10 @@ pub async fn home(
config.clients.retain(|c| c.id != delete_client_id);
config.save().await?;
success_message = Some("The client was successfully deleted!".to_string());
// TODO : close connections with given id
if let Err(e) = tx.send(WsMessage::CloseClientSession(delete_client_id)) {
log::error!("Failed to send CloseClientSession: {}", e);
}
}
}