Skip to content

Commit 42b9803

Browse files
Fix caching in LazyUpdateHandleImpl (#2098)
* Fix caching in LazyUpdateHandleImpl * Fix dumb condition mistake
1 parent bf392f5 commit 42b9803

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

temporal-sdk/src/main/java/io/temporal/client/LazyUpdateHandleImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ public String getId() {
7575
public CompletableFuture<T> getResultAsync(long timeout, TimeUnit unit) {
7676

7777
WorkflowClientCallsInterceptor.PollWorkflowUpdateOutput<T> pollCall = null;
78-
boolean setFromWaitCompleted = false;
7978

8079
// If waitCompleted was called, use the result from that call.
8180
synchronized (this) {
@@ -85,7 +84,7 @@ public CompletableFuture<T> getResultAsync(long timeout, TimeUnit unit) {
8584
}
8685
}
8786

88-
if (!setFromWaitCompleted) {
87+
if (pollCall == null) {
8988
pollCall = pollUntilComplete(timeout, unit);
9089
}
9190

0 commit comments

Comments
 (0)