mirror of https://github.com/4yn/slidershim
reset brokenithm input on close controller
parent
61505c2375
commit
8fbb9e4d9f
|
@ -136,12 +136,18 @@ async fn handle_brokenithm(
|
||||||
}
|
}
|
||||||
Message::Close(_) => {
|
Message::Close(_) => {
|
||||||
info!("Websocket connection closed");
|
info!("Websocket connection closed");
|
||||||
|
let mut input_handle = state_handle.input.lock();
|
||||||
|
input_handle.ground.fill(0);
|
||||||
|
input_handle.air.fill(0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
},
|
},
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
error!("Websocket connection error: {}", e);
|
error!("Websocket connection error: {}", e);
|
||||||
|
let mut input_handle = state_handle.input.lock();
|
||||||
|
input_handle.ground.fill(0);
|
||||||
|
input_handle.air.fill(0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue