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

On FreeBSD tokio-serial seems not to notice, that port is (physically) removed during wait for inbound data #56

Open
p-kraszewski opened this issue Jul 1, 2022 · 0 comments

Comments

@p-kraszewski
Copy link

p-kraszewski commented Jul 1, 2022

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-serial is waiting for inbound data (reacts as expected on inbound data, the codec framework is exceptional!)
  • I yank the adapter from socket EDIT: (/dev/ttyU0 does not disappear as long as program holds it)
  • The tokio-serial is still waiting... For something... Crickets...
  • As /dev/ttyU0 is still held, after re-plugging the adapter registers as /dev/ttyU1
  • The tokio-serial is 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant