tokio-serial
tokio-serial copied to clipboard
On FreeBSD tokio-serial seems not to notice, that port is (physically) removed during wait for inbound data
Environment
- OS:
FreeBSD 13.1-RELEASE GENERIC, default config - Rust:
1.62.0 (a8314ef7d 2022-06-27) - tokio-serial
v5.4.3 - mio-serial
v5.0.2 - serialport
v4.2.0
Test scenario
- FreeBSD box with USB-Serial adapter (device at
/dev/ttyU0) - The
tokio-serialis waiting for inbound data (reacts as expected on inbound data, the codec framework is exceptional!) - I yank the adapter from socket EDIT: (
/dev/ttyU0does not disappear as long as program holds it) - The
tokio-serialis still waiting... For something... Crickets... - As
/dev/ttyU0is still held, after re-plugging the adapter registers as/dev/ttyU1 - The
tokio-serialis still waiting... For something... Crickets...
Expected behavior
After yanking the cable, XXX.next() should return error on next poll.
Is that something to be resolved at the tokio-serial or mio-serial level?
Best regards