pydualsense icon indicating copy to clipboard operation
pydualsense copied to clipboard

Bugfix/handle hidapi exceptions in sendReport

Open dalethomas81 opened this issue 1 year ago • 7 comments

Handle an exception generated by hidapi in the sendReport thread. This exception is thrown when no controller is connected. Since the exception is not handled, the thread ends, and the service needs to be restarted to recover. By handling these exceptions, the service becomes fault tolerant and is able to recover automatically.

  • Added a Try/Exception to handle an IOError and an AttributeError.
  • Added a Connected property to indicate when the device is not connected.

dalethomas81 avatar May 27 '24 04:05 dalethomas81

Thanks for the pull request, i added some remarks :)

flok avatar May 27 '24 20:05 flok

Hey @flok - sorry, I am not seeing the remarks. Where can I find them?

dalethomas81 avatar May 28 '24 07:05 dalethomas81

Btw, this fixes #48.

dalethomas81 avatar May 28 '24 07:05 dalethomas81

Hey @flok - sorry, I am not seeing the remarks. Where can I find them?

You should see them in this thread at the top as a review from me

flok avatar May 31 '24 18:05 flok

I believe you may not have submitted the review request as there are none. Do you mind trying again or pasting your review here? Thank you for your patience. I am enjoying using this in my project. image

dalethomas81 avatar Jun 01 '24 02:06 dalethomas81

I believe you may not have submitted the review request as there are none. Do you mind trying again or pasting your review here? Thank you for your patience. I am enjoying using this in my project.

You are right, my bad. Mostly working with gitlab now a days and forgot to press the button. You should be able to see it now

flok avatar Jun 01 '24 07:06 flok

No worries! I did respond to your review. Can you let me know if that is satisfactory? Thank you.

dalethomas81 avatar Jun 05 '24 07:06 dalethomas81