tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Klenk <sebastiankl...@visions-tec.de>
Subject Re: RES: TCP-FIN problem
Date Tue, 23 Dec 2003 17:04:33 GMT
actually i thought that tomcat was supposed to close the connection 
after all data has been send - if not this explains a lot!



         try {

             int c;
             while(-1 != (c = Reciever.read())) /* here I'm "waiting" 
until the connection is closed! */
                 XMLBuffer.append((char)c);

         }catch (EOFException e){
         }catch (Exception e) {
             System.out.println("getServer() : Exception Cought: " + 
e.getMessage());
             return null;
             }


Philipp Taprogge wrote:
> Hi!
> 
> Sebastian Klenk wrote:
> 
>> I didn't do anything ... the only problem I have is that my app. is 
>> not very fast, and that is because it has to wait for tomcat to close 
>> the connection, but tomcat closes the connection a lot later (ca 1 
>> minute).
>> My question is now if there is a way to tell tomcat that all data has 
>> been written an that the connection can be closend!?
> 
> 
> Your problem is not tomcat, but the application. Tomcat uses a default 
> timeout of 60 seconds on the socket. But what seems to happen in your 
> case is not tomcat causing that timeout, but _experiencing_ it.
> Your application is not closing the connection properly and tomcat keeps 
> it open until the timeout occurs. Could you perhaps post more 
> information on that application? Is it written in Java as well? Perhaps 
> you could post some code snipplets?
> 
>     Phil
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message