367048 improved handleRequest guard for suspended requests
This commit is contained in:
parent
44de94f185
commit
f767d8d910
|
@ -203,6 +203,25 @@ public class AsyncContinuation implements AsyncContext, Continuation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------ */
|
||||||
|
public boolean isDispatchable()
|
||||||
|
{
|
||||||
|
synchronized(this)
|
||||||
|
{
|
||||||
|
switch(_state)
|
||||||
|
{
|
||||||
|
case __REDISPATCH:
|
||||||
|
case __REDISPATCHED:
|
||||||
|
case __REDISPATCHING:
|
||||||
|
case __COMPLETING:
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -62,8 +62,11 @@ public class AsyncHttpConnection extends AbstractHttpConnection implements Async
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Handle resumed request
|
// Handle resumed request
|
||||||
if (_request._async.isAsync() && !_request._async.isComplete())
|
if (_request._async.isAsync())
|
||||||
handleRequest();
|
{
|
||||||
|
if ( _request._async.isDispatchable())
|
||||||
|
handleRequest();
|
||||||
|
}
|
||||||
// else Parse more input
|
// else Parse more input
|
||||||
else if (!_parser.isComplete() && _parser.parseAvailable())
|
else if (!_parser.isComplete() && _parser.parseAvailable())
|
||||||
progress=true;
|
progress=true;
|
||||||
|
|
Loading…
Reference in New Issue