Browse Source

fix: ignore communication error when drop usb

main
Andelf 2 years ago
parent
commit
b0d387c471
  1. 5
      src/transport/usb.rs

5
src/transport/usb.rs

@ -112,8 +112,9 @@ impl UsbTransport {
impl Drop for UsbTransport {
fn drop(&mut self) {
self.device_handle.release_interface(0).unwrap();
self.device_handle.reset().unwrap();
// ignore any communication error
let _ = self.device_handle.release_interface(0);
// self.device_handle.reset().unwrap();
}
}

Loading…
Cancel
Save