I wish if AsyncStream catch IOException so we can read and handle or filter out exceptions like
it refers that AsyncStreams.java on line 232 throw this error which after I check the github source I see it refers to this method
which throws this IOException we can simply pass a parameter in the event that carry the exception as string and handle it as needed without throw this exception in the logger
B4X:
java.net.SocketException: Connection reset
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:186)
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:126)
at anywheresoftware.b4a.randomaccessfile.AsyncStreams$AIN.run(AsyncStreams.java:232)
at java.base/java.lang.Thread.run(Thread.java:834)
it refers that AsyncStreams.java on line 232 throw this error which after I check the github source I see it refers to this method
B4X:
private void closeUnexpected() throws IOException {
ba.raiseEventFromDifferentThread(AsyncStreams.this, null, 0, eventName + "_terminated", false, null);
AsyncStreams.this.Close(); //close both threads
}
which throws this IOException we can simply pass a parameter in the event that carry the exception as string and handle it as needed without throw this exception in the logger