tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kees Jan Koster <kjkos...@gmail.com>
Subject Re: connection reset errors
Date Tue, 22 May 2012 10:56:25 GMT
Dear Jose,

>> Yes I am. In finally{} block. Here is the client code:
> 
> Calling the disconnect() method of HttpURLConnection may close the
> underlying socket
> if a persistent connection is otherwise idle at that time
> Try don't call it,  test it and tell us :-)
> 
> http://docs.oracle.com/javase/1.5.0/docs/guide/net/http-keepalive.html

Ugh. I never realized the socket API was this messy.

At any rate, I call connection.setRequestProperty("Connection", "close"); to indicate that
I do not want to make use of persistent connections. You can see that in my client code.

If the underlying socket were closed I would also occasionally see other methods than 'read'
get an error. The stack trace I posted is the only one I get, though.
--
Kees Jan

http://java-monitor.com/
kjkoster@kjkoster.org
+31651838192

Change is good. Granted, it is good in retrospect, but change is good.


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


Mime
View raw message