-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Inifinit loop when device plugged, unplugged, write #302
Comments
Can you share a stripped down version of your program that exhibits this behavior? |
Stripped example, it sends a command periodically (every second). If an error occurs stop sending. Keep this script running for a while and then unplug the USB device, it calls the
Here is a screen shot of the output, and notice that the error callback is called 9 times at the same microsecond! |
So can I restate your issue as "I receive more than one error event when I disconnect a device that has buffered data while running on Ubuntu. I expected to receive a disconnected event followed by an error event that told me that my buffered data was lost." Are you running x86/x64 Ubuntu? |
Yes, your description is exactly what I meant. |
I'm confirming this one, too. overloads my CPU, node process shows ~102%+ in my top |
I'd like this fix here to be merged upstream, please: https://github.com/yateya/node-serialport/commit/13284343c7aa125dd3275f0a28600c4a6a20b697 |
@flatr0ze can you rebase off the latest master? if anything to get the tests for #335 to pass. I'm not qualified enough to vet the patch however @JayBeavers and others will take a look =) |
it's not my fix, it's yateya who made it... I forked and am using it now as my npm, since the infinite loop was overloading my CPU |
Hey, I am getting a similar error too using the Duino module and I am using a Live-USB running ubunutu to toggle an led, on and off. The terminal error result is: (please help) events.js:72 |
I am using serial-port with a USB device on ubunutu. I get infinite-loop using the following procedures:
The text was updated successfully, but these errors were encountered: