Skip to content

Commit

Permalink
Have launch darkly block main thread for up to 1s
Browse files Browse the repository at this point in the history
We're noticing in production that GoPuff Android apps are not respecting
dynamic feature flag values. We played around with this in dev and it
appeared that LDClient was reading the default VGS flag becuase we were
not giving it any time to fetch the latest feature flag values.

We're trying to be a bit descrite with this change because we don't
think it will cause any issues and we think GoPuff may overreact a bit
if they learn we're allowing Forage to block the main thread
  • Loading branch information
devinmorgan committed Dec 1, 2023
1 parent 2032ef9 commit 8d9ac06
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ internal object LDManager {
internal fun initialize(app: Application, ldConfig: LDConfig) {
val contextKind = ContextKind.of(LDContextKind.SERVICE)
val context = LDContext.create(contextKind, LDContexts.ANDROID_CONTEXT)
client = LDClient.init(app, ldConfig, context, 0)
client = LDClient.init(app, ldConfig, context, 1)
}

internal fun getVaultProvider(logger: Log = Log.getSilentInstance()): VaultType {
Expand Down

0 comments on commit 8d9ac06

Please sign in to comment.