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
|
||||
|
|
|
@ -62,8 +62,11 @@ public class AsyncHttpConnection extends AbstractHttpConnection implements Async
|
|||
try
|
||||
{
|
||||
// Handle resumed request
|
||||
if (_request._async.isAsync() && !_request._async.isComplete())
|
||||
handleRequest();
|
||||
if (_request._async.isAsync())
|
||||
{
|
||||
if ( _request._async.isDispatchable())
|
||||
handleRequest();
|
||||
}
|
||||
// else Parse more input
|
||||
else if (!_parser.isComplete() && _parser.parseAvailable())
|
||||
progress=true;
|
||||
|
|
Loading…
Reference in New Issue