Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Every time the USB link is closed, an error log is printed #569

Closed
mengzhidaren opened this issue Apr 11, 2024 · 1 comment
Closed

Every time the USB link is closed, an error log is printed #569

mengzhidaren opened this issue Apr 11, 2024 · 1 comment

Comments

@mengzhidaren
Copy link

mengzhidaren commented Apr 11, 2024

D/UsbDeviceConnectionJNI( 4637): close
W/SerialInputOutputManager( 4637): Run ending due to exception: Connection closed
W/SerialInputOutputManager( 4637): java.io.IOException: Connection closed
W/SerialInputOutputManager( 4637): at com.hoho.android.usbserial.driver.CommonUsbSerialPort.testConnection(CommonUsbSerialPort.java:162)
W/SerialInputOutputManager( 4637): at com.hoho.android.usbserial.driver.FtdiSerialDriver$FtdiSerialPort.read(FtdiSerialDriver.java:156)
W/SerialInputOutputManager( 4637): at com.hoho.android.usbserial.util.SerialInputOutputManager.step(SerialInputOutputManager.java:225)
W/SerialInputOutputManager( 4637): at com.hoho.android.usbserial.util.SerialInputOutputManager.run(SerialInputOutputManager.java:203)
W/SerialInputOutputManager( 4637): at java.lang.Thread.run(Thread.java:761)

If the thread is closed after:

Run ending due to exception: Connection closed
java.io.IOException: Connection closed
at com.hoho.android.usbserial.driver.CommonUsbSerialPort.testConnection(CommonUsbSerialPort.java:162)
at com.hoho.android.usbserial.driver.FtdiSerialDriver$FtdiSerialPort.read(FtdiSerialDriver.java:156)
at com.hoho.android.usbserial.util.SerialInputOutputManager.step(SerialInputOutputManager.java:225)
at com.hoho.android.usbserial.util.SerialInputOutputManager.run(SerialInputOutputManager.java:203)
at java.lang.Thread.run(Thread.java:761)

@kai-morich
Copy link
Collaborator

I will check if it can be distinguished into normal close and real IO error

kai-morich added a commit that referenced this issue Apr 25, 2024
- isOpen() returns false during concurrent close()
- less tracing in SerialInputOutputManager
kai-morich added a commit that referenced this issue Jun 2, 2024
reworked previous solution from change 8b9ad7e / v3.7.1 because closeInt() was not working any more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants