mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
don't crash if the pumper thread can't send a redraw poll
This commit is contained in:
parent
e824334747
commit
b39ec5d044
1 changed files with 2 additions and 2 deletions
|
|
@ -151,10 +151,10 @@ pub(crate) fn pumper(mode: Arc<Mutex<VaultMode>>, sid: xous::SID, main_conn: xou
|
||||||
log::trace!("{:?}", opcode);
|
log::trace!("{:?}", opcode);
|
||||||
match opcode {
|
match opcode {
|
||||||
Some(PumpOp::Pump) => {
|
Some(PumpOp::Pump) => {
|
||||||
send_message(main_conn,
|
try_send_message(main_conn,
|
||||||
Message::new_scalar(crate::VaultOp::Redraw.to_usize().unwrap(),
|
Message::new_scalar(crate::VaultOp::Redraw.to_usize().unwrap(),
|
||||||
0, 0, 0, 0)
|
0, 0, 0, 0)
|
||||||
).expect("couldn't pump redraw");
|
).ok(); // don't panic if the queue overflows
|
||||||
let mode_cache = {(*mode.lock().unwrap()).clone()};
|
let mode_cache = {(*mode.lock().unwrap()).clone()};
|
||||||
{ // we really want mode.lock() to be in a different scope so...
|
{ // we really want mode.lock() to be in a different scope so...
|
||||||
if mode_cache == VaultMode::Totp {
|
if mode_cache == VaultMode::Totp {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue