tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 59220] New: AsyncListener#onComplete not called after timeout if buffer is flushed
Date Wed, 23 Mar 2016 13:17:59 GMT

            Bug ID: 59220
           Summary: AsyncListener#onComplete not called after timeout if
                    buffer is flushed
           Product: Tomcat 8
           Version: 8.0.32
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina

If an async dispatch cycle is started and a timeout occurs before the response
buffer is flushed using response#flushBuffer(), then the
method followed by the AsyncListener#onComplete() are correctly called.

However, if the buffer is flushed before the timeout occurs, the 
AsyncListener#onTimeout() method will be called, but the 
AsyncListener#onComplete() will not be.

A sample servlet demonstrating the problem, AsyncDebugListener, is provided 
at the following location:

Build the AsyncDebugListener module using 'mvn install' and deploy it on

The service method and each of the AsyncListener methods logs output to the
AsyncListener.log file. You can follow execution by looking at the logs.

Assuming Tomcat is installed locally, you can use the following URLs:

1) No timeout - works correctly:


2) Timeout, no flush - works correctly:


3) Flush before timeout - error case:


>From the logs, you will see that AsyncListener#onTimeout() was called, but  
AsyncListener#onComplete() was not.

Thanks for having a look at this!

You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message