pub async fn shutdown() {
    std::fs::write(
        "current_pages.json",
        serde_json::to_value(&STATUS.lock().await.current_pages)
            .unwrap()
            .to_string(),
    )
    .unwrap();

    disconnect_clients().await;
}
// Run when the server exits, to notify clients and save data.
Run when the server exits, to notify clients and save data.
Run when the server exits to notify clients and save data .
pub async fn shutdown() {
    std::fs::write(
        "current_pages.json",
        serde_json::to_value(&STATUS.lock().await.current_pages)
            .unwrap()
            .to_string(),
    )
    .unwrap();
    disconnect_clients().await;
}
pub async fn shutdown ( ) { std :: fs :: write ( " " , serde_json :: to_value ( & STATUS . lock ( ) . await . current_pages ) . unwrap ( ) . to_string ( ) , ) . unwrap ( ) ; disconnect_clients ( ) . await ; }
Run when the server exits, to notify clients and save data.
Run when the server exits to notify clients and save data .