rust
rust copied to clipboard
Pulling USB out is not detected and eats 100% CPU
Steps to reproduce
- Run basic_serial example and enter port name of plugged-in device
- Wait for console to calm down and pull the USB out
- Observe example loop is still running, console is clean, 1 CPU core is 100% utilized
Possible reason
This line is getting executed endlessly: https://github.com/meshtastic/rust/blob/923d2b7ec5b831a1fd2dc9f05d6d84424acfd3ec/src/connections/handlers.rs#L60 If I return an error here the example starts to work, but I'm not sure it will not break something else.