Okay so what I discovered is that the connection doesn't close if you have HTTPD in front of Tomcat until the connection timeout for the connector. The nasty thing is that I'm still using the abandoned ModWebapps (which was great but Pier decided to abdicate), so the connection timeout is not configurable.

Therefore no IOException is ever generated! I tried anyhow with a little reaper thread to close the connection but its not being activated because as far as it knows, everything is rosey.



Conrad F. D'Cruz wrote:

You could buffer the data and write it out in chunks ... testing in between
writes by flush().  If the stream has been closed by a broken client
connection you will get an IOException.

Conrad

"Andrew C. Oliver" wrote:



I guess if I open up a reaper thread I could do that.. . I can't very
well close the stream if I'm blocked on the write call  (hence the
bind)..  I would rather not open up a thread to do that, but I guess I
can if I have to.

-Andy

Richard O. Hammer wrote:



Andy,

I think this might work.
It appears to me that you can call close() on the ServletOutputStream.
I believe that will cause your write() on the ServletOutputStream
(which was blocked) to throw an IOException.

If you set a boolean breakoffOrdered = true, before you close the
stream, then when you catch the IOException you can test if
breakoffOrdered, and act accordingly.

Rich


_______________________________________________ Juglist mailing list [EMAIL PROTECTED] http://trijug.org/mailman/listinfo/juglist_trijug.org



_______________________________________________
Juglist mailing list
[EMAIL PROTECTED]
http://trijug.org/mailman/listinfo/juglist_trijug.org




_______________________________________________
Juglist mailing list
[EMAIL PROTECTED]
http://trijug.org/mailman/listinfo/juglist_trijug.org






_______________________________________________ Juglist mailing list [EMAIL PROTECTED] http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to