Fix mtproto deadlock when leaving scheduled call

This commit is contained in:
Ali
2021-04-09 15:21:26 +04:00
parent 23c518a933
commit d87b5704b4

View File

@@ -823,6 +823,8 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
} }
deinit { deinit {
assert(Queue.mainQueue().isCurrent())
self.audioSessionShouldBeActiveDisposable?.dispose() self.audioSessionShouldBeActiveDisposable?.dispose()
self.audioSessionActiveDisposable?.dispose() self.audioSessionActiveDisposable?.dispose()
self.summaryStateDisposable?.dispose() self.summaryStateDisposable?.dispose()
@@ -1074,6 +1076,9 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
activeCallInfo = nil activeCallInfo = nil
} }
} }
if self.leaving {
shouldJoin = false
}
if shouldJoin, let callInfo = activeCallInfo { if shouldJoin, let callInfo = activeCallInfo {
let callContext: OngoingGroupCallContext let callContext: OngoingGroupCallContext