mirror of
https://github.com/mik3y/usb-serial-for-android.git
synced 2026-08-23 14:23:00 +00:00
catch exception thrown by close()
This commit is contained in:
+3
-1
@@ -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) {
|
||||||
close();
|
try {
|
||||||
|
close();
|
||||||
|
} catch(Exception ignored) {}
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user