-
Notifications
You must be signed in to change notification settings - Fork 287
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
Better handling of closed stream errors #1304
Conversation
} | ||
catch(DeviceException e) { | ||
catch(WebSocketException | DeviceException e) { | ||
// Calling usb.close() can cause a hard-crash on macOS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Vzor- I thought we had gracefully handled this in our upstream PR, but somehow I'm able to crash the app here if I call usb.close()
. gary-rowe/hid4java#153.
I'm leaving this comment in the source code for now as a future warning.
Crashing it's pretty easy, just change usb.setStreaming(false)
to usb.close()
and close the tab while the device is streaming.
Testing this... sadly, the
|
I think this is fixed via f0e3754. |
Addresses the issue in #1300 where streams will continue to attempt sending data to a closed stream until explicitly closed.