We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6bcc2cf commit 1806f01Copy full SHA for 1806f01
src/io_uring.rs
@@ -298,14 +298,21 @@ pub async fn io_loop(
298
"{} 📂 Opening USB accessory device: <u>{}</u>",
299
NAME, USB_ACCESSORY_PATH
300
);
301
- hu_usb = Some(
302
- OpenOptions::new()
303
- .read(true)
304
- .write(true)
305
- .create(false)
306
- .open(USB_ACCESSORY_PATH)
307
- .await?,
308
- );
+ match OpenOptions::new()
+ .read(true)
+ .write(true)
+ .create(false)
+ .open(USB_ACCESSORY_PATH)
+ .await
+ {
+ Ok(s) => hu_usb = Some(s),
309
+ Err(e) => {
310
+ error!("{} 🔴 Error opening USB accessory: {}", NAME, e);
311
+ // notify main loop to restart
312
+ need_restart.notify_one();
313
+ continue;
314
+ }
315
316
}
317
318
info!("{} ♾️ Starting to proxy data between HU and MD...", NAME);
0 commit comments