Merge pull request #1863 from WhisperSystems/mkirk/fix-end-call-freeze-and-fail

Fix "Call failed" due to deadlock when immediately terminating call
pull/1/head
Michael Kirk 8 years ago committed by GitHub
commit 78b98a5a91

@ -456,7 +456,7 @@ class PeerConnectionClient: NSObject, RTCPeerConnectionDelegate, RTCDataChannelD
AssertIsOnMainThread()
Logger.debug("\(TAG) in \(#function)")
PeerConnectionClient.signalingQueue.sync {
PeerConnectionClient.signalingQueue.async {
assert(self.peerConnection != nil)
self.terminateInternal()
}

@ -272,6 +272,7 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate {
Logger.debug("\(TAG) Received \(#function) CXEndCallAction")
guard let call = callManager.callWithLocalId(action.callUUID) else {
Logger.error("\(self.TAG) in \(#function) trying to end unknown call with localId: \(action.callUUID)")
action.fail()
return
}
@ -340,7 +341,7 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate {
func provider(_ provider: CXProvider, timedOutPerforming action: CXAction) {
AssertIsOnMainThread()
Logger.debug("\(TAG) Timed out \(#function)")
Logger.debug("\(TAG) Timed out \(#function) while performing \(action)")
// React to the action timeout if necessary, such as showing an error UI.
}

Loading…
Cancel
Save