MCPcopy Index your code
hub / github.com/apache/tomcat / asyncError

Method asyncError

java/org/apache/coyote/AsyncStateMachine.java:423–455  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

421
422
423 synchronized boolean asyncError() {
424 Request request = processor.getRequest();
425 boolean containerThread = (request != null && request.isRequestThread());
426
427 if (log.isTraceEnabled()) {
428 log.trace(sm.getString("asyncStateMachine.asyncError.start"));
429 }
430
431 clearNonBlockingListeners();
432 if (state == AsyncState.STARTING) {
433 updateState(AsyncState.MUST_ERROR);
434 } else {
435 if (hasProcessedError) {
436 if (log.isTraceEnabled()) {
437 log.trace(sm.getString("asyncStateMachine.asyncError.skip"));
438 }
439 return false;
440 }
441 hasProcessedError = true;
442 if (state == AsyncState.DISPATCHED) {
443 // Async error handling has moved processing back into an async
444 // state. Need to increment in progress count as it will decrement
445 // when the async state is exited again.
446 asyncCtxt.incrementInProgressAsyncCount();
447 updateState(AsyncState.ERROR);
448 } else {
449 updateState(AsyncState.ERROR);
450 }
451 }
452
453 // Return true for non-container threads to trigger a dispatch
454 return !containerThread;
455 }
456
457
458 synchronized void asyncRun(Runnable runnable) {

Callers 2

setErrorStateMethod · 0.80
actionMethod · 0.80

Calls 8

isRequestThreadMethod · 0.95
updateStateMethod · 0.95
getRequestMethod · 0.65
isTraceEnabledMethod · 0.65
traceMethod · 0.65
getStringMethod · 0.65

Tested by

no test coverage detected