-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
Describe the bug
Crash (synchronization issue)
SDK version
9.1.1
OS/platform
iOS
Seems this is retain cycle issue:
self.throttler.runThrottled {
// since going online was throttled, check the last called setOnline value and whether we can go online
self.go(online: goOnline && self.canGoOnline, reasonOnlineUnavailable: self.reasonOnlineUnavailable(goOnline: goOnline), completion: completion)
}here you are capturing self inside throttler:
LDClient -> throttler -> runQueue -> runThrottled -> self (LDClient)
this method should look like this:
self.throttler.runThrottled { [weak self] in
guard let self else {
completion?()
return
}
// since going online was throttled, check the last called setOnline value and whether we can go online
self.go(online: goOnline && self.canGoOnline, reasonOnlineUnavailable: self.reasonOnlineUnavailable(goOnline: goOnline), completion: completion)
}Metadata
Metadata
Assignees
Labels
No labels
