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

Adapter hot swapping and fix crash when disconnecting adapter on macOS #303

Merged
merged 2 commits into from
Jul 18, 2021

Conversation

NikhilNarayana
Copy link
Member

Closes #257
Closes #301

Combines the two PRs into one and fixes merge conflicts so I could get testing done.

JulienBernard3383279 and others added 2 commits July 17, 2021 20:18
* On macOS 11.0 I noticed that the libusb hotplug event was getting
  called on the read thread. This seemed to be different behavior than
  my windows platform where the hotplug event was happening on it's
  own thread

* when a hotplug detach event happens the reset thread waits for the
  in and out threads to error out with "join"

* however, on macOS 11.0 (when started with an adapter plugged in),
  the detach event would attempt to join itself causing a crash.

* To get around this before trying to join threads reset will try to
  see if it is one of those threads and start a new reset thread if
  so.

* If we wait attempt to join the reset thread from the caller they
  will both be trying to join each other which will also result in a crash
@NikhilNarayana NikhilNarayana merged commit 33a4a92 into slippi Jul 18, 2021
@NikhilNarayana NikhilNarayana deleted the fix/adapter-stuff branch July 18, 2021 04:27
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

Successfully merging this pull request may close these issues.

3 participants