danielpaulus / quicktime_video_hack

Record iOS device audio and video
MIT License
520 stars 110 forks source link

Fix infinite loop when unable to re-open device after activating QT config #99

Open cameronbroe opened 3 years ago

cameronbroe commented 3 years ago

I notice that the intended behavior is to attempt to re-open a device 10 times and return an error if the USB context can not be reopened. However, the actual behavior is an infinite loop of trying to reopen the context. This PR prevents that infinite loop from happening and appropriately exits and logs after 10 tries. I encountered this code path on my own device and had to manually send Ctrl-C to retry the activation.