I'm experiencing that if an error occurs midstream, jUART is left in a broken state where it can no longer open a socket and communicate.
I think this is because an error created by the async recv or send calls results in a premature call to SerialAPI::do_close which ends the io loop with no associated io.reset() call to reset the io loop, resulting in the next call to io.run() returning immediately, but I haven't verified this yet.
I'm testing this error using socat -v -x pty,raw,echo=0,link=ttyfake1 pty,raw,echo=0,link=ttyfake2, opening ttyfake1 with jUART, then killing the socat process to trigger a premature close.
I'm experiencing that if an error occurs midstream, jUART is left in a broken state where it can no longer open a socket and communicate.
I think this is because an error created by the async recv or send calls results in a premature call to SerialAPI::do_close which ends the io loop with no associated io.reset() call to reset the io loop, resulting in the next call to io.run() returning immediately, but I haven't verified this yet.
I'm testing this error using
socat -v -x pty,raw,echo=0,link=ttyfake1 pty,raw,echo=0,link=ttyfake2
, opening ttyfake1 with jUART, then killing the socat process to trigger a premature close.