fix threading issue
This commit is contained in:
parent
3c4a19e30d
commit
17b15f2cd9
|
@ -152,7 +152,7 @@ final class HomeVC : BaseVC, UITableViewDataSource, UITableViewDelegate, NewConv
|
|||
// Re-populate snode pool if needed
|
||||
SnodeAPI.getSnodePool().retainUntilComplete()
|
||||
// Onion request path countries cache
|
||||
DispatchQueue.global(qos: .utility).async {
|
||||
DispatchQueue.global(qos: .utility).sync {
|
||||
let _ = IP2Country.shared.populateCacheIfNeeded()
|
||||
}
|
||||
// Get default open group rooms if needed
|
||||
|
|
|
@ -46,7 +46,8 @@ final class IP2Country {
|
|||
}
|
||||
|
||||
@objc func populateCacheIfNeededAsync() {
|
||||
IP2Country.workQueue.async {
|
||||
// This has to be sync since the `countryNamesCache` dict doesn't like async access
|
||||
IP2Country.workQueue.sync {
|
||||
let _ = self.populateCacheIfNeeded()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue