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

open() fails when called twice #15

Open
slobodan-ilic opened this issue Jul 9, 2014 · 0 comments
Open

open() fails when called twice #15

slobodan-ilic opened this issue Jul 9, 2014 · 0 comments

Comments

@slobodan-ilic
Copy link

Hi Gary,

If I always call open() and close() methods before and after processing the data, everything works fine. However, if there is an error during the processing, and if I lose the reference to the original hid.device() object, the call to open(), on a newly created hid.device() will fail with an IOError. A call to close() on the recreated object doesn't seem to actually close the resources that have been associated with the original object. There seems to be no possibility of closing the hid device, based on vid and pid, except for always pairing the open() and close() calls up.

Is this the supposed behavior, and if so, what is the preferred method of handling such situations (e.g. open(), process(might fail), close())?

Best,
Slobodan

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