I'm curious as well -- I ran into this too and the only work around I had was 
to send a heartbeat which, if the client was gone, would complete the lifecycle 
(server sent events in my particular case).

This was ugly and felt wrong so I'd love to know the right thing to do.

> On Aug 25, 2015, at 12:12, Steffen Heil (Mailinglisten) 
> <li...@steffen-heil.de> wrote:
> 
> Hi
> 
> 
> When using async servlets with timeout set to 0, tomcat seems not to detect, 
> if the client closes the connection.
> At least the servlet listener is not notified.
> 
> I expected "AsyncListener.onComplete" or "AsyncListener.onError" or 
> "AsyncListener.onTimeout", but none of these are called.
> The only thing called is "ReadListener.onAllDataRead" but that’s expected as 
> the request is a POST request with few inbound data but long running outbound 
> data.
> 
> Now we have no way to detect when the connection to the client is broken.
> On TCP level the connection was closed (FIN/FIN+ACK), so tomcat should know 
> that the connection is gone.
> Is there any way to get notified about that or at least to check manually?
> 
> 
> Regards,
>  Steffen
> 
> 
> 
> BTW: I am posting new questions that are not direct follow-ups as top 
> messages. If there is another policy for this list, please let me know.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to