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 {
31
31
}
32
32
33
33
static 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 ) ;
35
35
36
36
fn monitor_notification_callback ( notification : MonitorNotification ) {
37
37
match notification {
38
38
MonitorNotification :: Connected => {
39
39
println ! ( "Connected to monitor" ) ;
40
- CONNECTED . store ( true , Ordering :: Relaxed ) ;
40
+ MONITOR_CONNECTED . store ( true , Ordering :: Relaxed ) ;
41
41
}
42
42
MonitorNotification :: Disconnected => {
43
43
println ! ( "Disconnected from monitor" ) ;
44
- CONNECTED . store ( false , Ordering :: Relaxed ) ;
44
+ MONITOR_CONNECTED . store ( false , Ordering :: Relaxed ) ;
45
45
}
46
46
MonitorNotification :: Updated ( update) => {
47
47
// Filter out all events except player events
@@ -100,7 +100,7 @@ async fn handle_socket(mut socket: WebSocket) {
100
100
let mut last_connected = true ;
101
101
loop {
102
102
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 ) ;
104
104
let msg = {
105
105
if last_connected && !currently_connected {
106
106
last_connected = false ;
You can’t perform that action at this time.
0 commit comments