AristoChen / usb-proxy

A USB proxy based on raw-gadget and libusb
Apache License 2.0
152 stars 29 forks source link

reset device may trigger hotplug thread and the process will be killed #20

Open AristoChen opened 8 months ago

AristoChen commented 8 months ago

Based on the discussion, we may need to implement a mechanism to prevent the hotplug thread kill the process if the Host send reset request

These might not be the best solution, but what I have in my mind now are

  1. Stop the hotplug thread before reset, and try to restart the hotplug thread after reset
  2. Add a flag like this commit to let user decide whether the hotplug thread should be created or not, which will be default yes.