-
Notifications
You must be signed in to change notification settings - Fork 131
A deadlock can occur when joining a new room after disconnection #704
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
Labels
bug
Something isn't working
Comments
@6bangs unfortunately I wasn't able to reproduce it yet (Xcode 16.3, iOS 18.4.1).
func close() {
// prevent debounced negotiate firing
// await _debounce.cancel() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Disconnecting from a room sometimes hangs. Then when joining a new room, creating a new peer connection hangs, locking the liveKitWebRTC queue. It doesn't happen every time, but we have reproduced it with a fork of the example project.
SDK Version
2.5.1
iOS/macOS Version
iOS 18 (various, but most recently 18.4.1)
Xcode Version
16.3, Swift 5 or 6
Steps to Reproduce
All connection and disconnection code remains the same, but the app automatically joins a room and disconnects every 10 seconds.
Expected behavior
All participants should be able to connect and disconnect without deadlocks.
As far as I can tell, this is the sequence of events:
_pc.close
hangs indefinitely when closing the subscriber connection.At this point, all usages of
DispatchQueue.liveKitWebRTC
will wait indefinitely. Some of these calls happen from the main thread, so this can also result in freezing.I suspect
_pc.close
is waiting to run on the signaling thread, but so far I haven't been able to identify what the signaling thread is busy with.The text was updated successfully, but these errors were encountered: