Write to "missing" serial port causes spin #271

Closed
bigmonkeyboy opened this Issue Dec 8, 2013 · 3 comments

Comments

Projects
None yet
2 participants

If a previously plugged in USB serial port is unplugged... and then a write() is attempted... the app goes into a tight loop with no exit.

Error is "Error Bad file descriptor calling write(...)"
and I suspect it's not handled in serialport_unix.cpp around line 309 where it says
// We carefully DON'T break out of this loop.

Is there a way this can just surface the error once back to the higher levels (and indeed maybe cause a close to occur if really not there any longer) ?
Thanks

dceejay referenced this issue in node-red/node-red Dec 8, 2013

Closed

looping when serial port goes away #111

Collaborator

reconbot commented Dec 14, 2013

This looks very similar to #115

Similar , but this is on write and that is on read... which I think are different internal functions.

Collaborator

reconbot commented Jun 11, 2014

Working on this in #345

reconbot closed this Jun 11, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment