Hi,

When a client calls an asynchronous servlet and closes the connection a
java.io.IOException: Broken pipe is catched by Tomcat level when the webapp
tries to write to the socket.

This exception is not transmited to the webapp level but it seems the
request has been recycled (all content is reinitialised), in such a case it
impossible for the webapp to retrieve the AsyncContext from the
HttpServletRequest making the AsyncContext complete call impossible.

Activating the tomcat logging for AsyncContext
(org.apache.catalina.core.AsyncContextImpl.level = FINE) shows the recycle
method is called but not the complete method, what seems to confirm my
assumption. In a use case were the client waits for the response, I can see
both complete and recycle are called.

My question is, what is the impact of the complete not being called on the
AsyncContext, is the socket cleaned up properly ?

Thanks,
Thomas

Reply via email to