Skip to content

Commit

Permalink
Fix bug in completing futures twice
Browse files Browse the repository at this point in the history
  • Loading branch information
ravinperera00 committed Dec 10, 2024
1 parent 9701a1d commit 78e37ee
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ public BalFuture(Strand strand) {

public void complete(Object returnValue) {
if (visited.getAndSet(true)) {
throw ErrorCreator.createError(StringUtils.fromString("cannot complete the same future twice."),
new MapValueImpl<>(PredefinedTypes.TYPE_ERROR_DETAIL));
throw new IllegalStateException("cannot complete the same future twice.");
}
strand.returnValue = returnValue;
strand.scheduler.unblockStrand(strand);
Expand Down

0 comments on commit 78e37ee

Please sign in to comment.