From b39ec5d04468b8538a0dc4b4a8a087db16e32bff Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 11 Aug 2022 02:48:38 +0800 Subject: [PATCH] don't crash if the pumper thread can't send a redraw poll --- apps/vault/src/totp.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/vault/src/totp.rs b/apps/vault/src/totp.rs index 82708ead6..d24d450fa 100644 --- a/apps/vault/src/totp.rs +++ b/apps/vault/src/totp.rs @@ -151,10 +151,10 @@ pub(crate) fn pumper(mode: Arc>, sid: xous::SID, main_conn: xou log::trace!("{:?}", opcode); match opcode { Some(PumpOp::Pump) => { - send_message(main_conn, + try_send_message(main_conn, Message::new_scalar(crate::VaultOp::Redraw.to_usize().unwrap(), 0, 0, 0, 0) - ).expect("couldn't pump redraw"); + ).ok(); // don't panic if the queue overflows let mode_cache = {(*mode.lock().unwrap()).clone()}; { // we really want mode.lock() to be in a different scope so... if mode_cache == VaultMode::Totp {