Skip to content

Commit

Permalink
#12520 proper fix?
Browse files Browse the repository at this point in the history
Signed-off-by: Ludovic Orban <[email protected]>
  • Loading branch information
lorban committed Nov 18, 2024
1 parent d6abf80 commit df920ec
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,14 @@ Boolean abort(Throwable failure)
{
boolean handle = _state == State.WAITING;
if (handle)
{
_state = State.WOKEN;
// XXX changing the RequestState to COMPLETED *and* returning true here
// means completed(Throwable failure) will be called by the redispatching
// and the latter will throw on its _requestState check as it wants it
// to be COMPLETING.
_requestState = RequestState.COMPLETED;
_requestState = RequestState.COMPLETING;
}
else
{
_requestState = RequestState.COMPLETED;
}
return handle;
}
return null;
Expand Down Expand Up @@ -1025,7 +1027,7 @@ protected void completed(Throwable failure)
LOG.debug("completed {}", toStringLocked());

if (_requestState != RequestState.COMPLETING)
return; // Already completed, possibly by abort().
throw new IllegalStateException(this.getStatusStringLocked());

if (_event == null)
{
Expand Down

0 comments on commit df920ec

Please sign in to comment.