update ctap timeouts in the main loop

This is necessary because there are some timed permissions that
must expire over time that are not asynchronous like the
user presence tests.
This commit is contained in:
bunnie 2023-01-30 18:32:26 +08:00
parent 7cd2512e95
commit e64351569f

View file

@ -183,6 +183,7 @@ fn main() -> ! {
loop {
match ctap.env().main_hid_connection().u2f_wait_incoming() {
Ok(msg) => {
ctap.update_timeouts(Instant::now());
let mutex = opensk_mutex.lock().unwrap();
log::trace!("Received U2F packet");
let typed_reply = ctap.process_hid_packet(&msg.packet, Transport::MainHid, Instant::now());