async fn disconnect_clients() {
    let clients = &mut STATUS.lock().await.connections;
    let dc_msg = warp::ws::Message::text(json!({"disconnect": true}).to_string());
    for client in clients {
        log::debug!(target: "scr::sharing_service", "Sending message: {:?} to user {}", dc_msg, client.id);
        let _ = client.socket.send(dc_msg.clone()).await;
        let _ = client.socket.close().await;
    }
}
// Sends a message to notify every client of the server shutdown.
Sends a message to notify every client of the server shutdown.
Sends a message to notify every client of the server shutdown .
async fn disconnect_clients() {
    let clients = &mut STATUS.lock().await.connections;
    let dc_msg = warp::ws::Message::text(json!({"disconnect": true}).to_string());
    for client in clients {
        log::debug!(target: "scr::sharing_service", "Sending message: {:?} to user {}", dc_msg, client.id);
        let _ = client.socket.send(dc_msg.clone()).await;
        let _ = client.socket.close().await;
    }
}
async fn disconnect_clients ( ) { let clients = & mut STATUS . lock ( ) . await . connections ; let dc_msg = warp :: ws :: Message :: text ( json ! ( { " " true } ) . to_string ( ) ) ; for client in clients { log :: debug ! ( target " " " " dc_msg client id ) ; let _ = client . socket . send ( dc_msg . clone ( ) ) . await ; let _ = client . socket . close ( ) . await ; } }
Sends a message to notify every client of the server shutdown.
Sends a message to notify every client of the server shutdown .