Fix race condition

This commit is contained in:
Ali 2022-03-22 17:50:29 +04:00
parent df60780a26
commit 88994eac67

View File

@ -537,7 +537,9 @@ private final class CallSessionManagerContext {
guard let strongSelf = self else {
return
}
strongSelf.drop(internalId: internalId, reason: .disconnect, debugLog: .single(nil))
strongSelf.contexts.removeValue(forKey: internalId)
strongSelf.contextIdByStableId.removeValue(forKey: stableId)
strongSelf.ringingStatesUpdated()
}
}))
self.contextIdByStableId[stableId] = internalId