Re: Tomcat 5 is not generating IOException when connection closes

2004-01-08 Thread Remy Maucherat
Paulo Pizarro wrote: I have a servlet with a persistent connection open to a client (browser), and when the browser is closed or the user hits the stop button, the connection is closed, but the servlet isn't throwing the IOException when it should do it. (i guess) As i could notice, after about

Re: Tomcat 5 is not generating IOException when connection closes

2004-01-08 Thread Vitor Buitoni
What do you mean by ok? As far as i can see, the connection closes and writing data to the OutputStream should generate an IOException, but this isn't happening... :-( The problem is that my servlet is inside a loop, and needs to know when the client closes the connection, so it can exit the loo

RE: Tomcat 5 is not generating IOException when connection closes

2004-01-08 Thread Ralph Einfeldt
, 2004 1:37 PM > To: Tomcat Users List > Subject: Re: Tomcat 5 is not generating IOException when connection > closes > > If you say it's ok, it means that tomcat really buffers the data and > only generate the IOException when this buffer is full, and that this >

Re: Tomcat 5 is not generating IOException when connection closes

2004-01-08 Thread Vitor Buitoni
ni [mailto:[EMAIL PROTECTED] Sent: Thursday, January 08, 2004 1:37 PM To: Tomcat Users List Subject: Re: Tomcat 5 is not generating IOException when connection closes If you say it's ok, it means that tomcat really buffers the data and only generate the IOException when this buffer is full

Re: Tomcat 5 is not generating IOException when connection closes

2004-01-08 Thread Remy Maucherat
Vitor Buitoni wrote: What do you mean by ok? As far as i can see, the connection closes and writing data to the OutputStream should generate an IOException, but this isn't happening... :-( The problem is that my servlet is inside a loop, and needs to know when the client closes the connection,

Re: Tomcat 5 is not generating IOException when connection closes

2004-01-08 Thread Vitor Buitoni
Remy, I also tried using a PrintWriter, and i got the same results. checkError() only returns true when about 8k of data are sent after the connection has been closed. You said that there was indeed something wrong... I'm using Tomcat 5.0.16 , do you know if this version has already been fixed

Re: Tomcat 5 is not generating IOException when connection closes

2004-01-08 Thread Remy Maucherat
Vitor Buitoni wrote: Remy, I also tried using a PrintWriter, and i got the same results. checkError() only returns true when about 8k of data are sent after the connection has been closed. Yes, it's normal, since the normal stream will not throw an exception, the writer can't know about an erro

Re: Tomcat 5 is not generating IOException when connection closes

2004-01-09 Thread Vitor Buitoni
That's it! :-) socketBuffer="-1" really fixed the issue. thanks a lot, Vitor Remy Maucherat wrote: Vitor Buitoni wrote: Remy, I also tried using a PrintWriter, and i got the same results. checkError() only returns true when about 8k of data are sent after the connection has been closed. Ye