File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -31,17 +31,17 @@ struct Cli {
3131}
3232
3333static LATEST_UPDATE : LazyLock < RwLock < Option < MonitorUpdate > > > = LazyLock :: new ( || RwLock :: new ( None ) ) ;
34- static CONNECTED : AtomicBool = AtomicBool :: new ( true ) ;
34+ static MONITOR_CONNECTED : AtomicBool = AtomicBool :: new ( true ) ;
3535
3636fn monitor_notification_callback ( notification : MonitorNotification ) {
3737 match notification {
3838 MonitorNotification :: Connected => {
3939 println ! ( "Connected to monitor" ) ;
40- CONNECTED . store ( true , Ordering :: Relaxed ) ;
40+ MONITOR_CONNECTED . store ( true , Ordering :: Relaxed ) ;
4141 }
4242 MonitorNotification :: Disconnected => {
4343 println ! ( "Disconnected from monitor" ) ;
44- CONNECTED . store ( false , Ordering :: Relaxed ) ;
44+ MONITOR_CONNECTED . store ( false , Ordering :: Relaxed ) ;
4545 }
4646 MonitorNotification :: Updated ( update) => {
4747 // Filter out all events except player events
@@ -100,7 +100,7 @@ async fn handle_socket(mut socket: WebSocket) {
100100 let mut last_connected = true ;
101101 loop {
102102 let latest_update = LATEST_UPDATE . read ( ) . unwrap ( ) . clone ( ) ;
103- let currently_connected = CONNECTED . load ( Ordering :: Relaxed ) ;
103+ let currently_connected = MONITOR_CONNECTED . load ( Ordering :: Relaxed ) ;
104104 let msg = {
105105 if last_connected && !currently_connected {
106106 last_connected = false ;
You can’t perform that action at this time.
0 commit comments