mirror of
https://github.com/mik3y/usb-serial-for-android
synced 2025-06-08 00:16:13 +00:00
catch exception thrown by close()
This commit is contained in:
parent
6b7d358f1f
commit
ebc8d791fc
@ -102,7 +102,9 @@ public abstract class CommonUsbSerialPort implements UsbSerialPort {
|
|||||||
mUsbRequest = new UsbRequest();
|
mUsbRequest = new UsbRequest();
|
||||||
mUsbRequest.initialize(mConnection, mReadEndpoint);
|
mUsbRequest.initialize(mConnection, mReadEndpoint);
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
|
try {
|
||||||
close();
|
close();
|
||||||
|
} catch(Exception ignored) {}
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user