Skip to content

Commit

Permalink
fix: start() always sets user (#41)
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Yiu <[email protected]>
  • Loading branch information
tyiuhc and Tim Yiu authored Oct 21, 2023
1 parent fa9ae9e commit bc15a1f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ internal class DefaultExperimentClient internal constructor(

override fun start(user: ExperimentUser?): Future<ExperimentClient> {
synchronized(isRunningLock) {
this.user = user
if (isRunning) {
val future = AsyncFuture<ExperimentClient>()
future.complete(this)
Expand All @@ -128,7 +129,6 @@ internal class DefaultExperimentClient internal constructor(
this.poller.start()
}
}
this.user = user
return this.executorService.submit(
Callable {
val flagsFuture = doFlags()
Expand Down

0 comments on commit bc15a1f

Please sign in to comment.