diff --git a/sdk/src/main/java/com/amplitude/experiment/DefaultExperimentClient.kt b/sdk/src/main/java/com/amplitude/experiment/DefaultExperimentClient.kt index 8529d3a..339c66d 100644 --- a/sdk/src/main/java/com/amplitude/experiment/DefaultExperimentClient.kt +++ b/sdk/src/main/java/com/amplitude/experiment/DefaultExperimentClient.kt @@ -117,6 +117,7 @@ internal class DefaultExperimentClient internal constructor( override fun start(user: ExperimentUser?): Future { synchronized(isRunningLock) { + this.user = user if (isRunning) { val future = AsyncFuture() future.complete(this) @@ -128,7 +129,6 @@ internal class DefaultExperimentClient internal constructor( this.poller.start() } } - this.user = user return this.executorService.submit( Callable { val flagsFuture = doFlags()