#12520 identification of the bug + naive (and partially wrong) fix
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
parent
dd31feb034
commit
d6abf806dc
|
@ -354,7 +354,6 @@ public class HttpChannelState
|
|||
*/
|
||||
Boolean abort(Throwable failure)
|
||||
{
|
||||
boolean handle;
|
||||
try (AutoLock ignored = lock())
|
||||
{
|
||||
boolean aborted = abortResponse(failure);
|
||||
|
@ -362,9 +361,13 @@ public class HttpChannelState
|
|||
LOG.debug("abort={} {}", aborted, this, failure);
|
||||
if (aborted)
|
||||
{
|
||||
handle = _state == State.WAITING;
|
||||
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;
|
||||
return handle;
|
||||
}
|
||||
|
@ -1022,7 +1025,7 @@ public class HttpChannelState
|
|||
LOG.debug("completed {}", toStringLocked());
|
||||
|
||||
if (_requestState != RequestState.COMPLETING)
|
||||
throw new IllegalStateException(this.getStatusStringLocked());
|
||||
return; // Already completed, possibly by abort().
|
||||
|
||||
if (_event == null)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue