hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 25372] - auto close idle connections
Date Fri, 09 Apr 2004 16:51:29 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=25372>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=25372

auto close idle connections





------- Additional Comments From mohammad.rezaei@gs.com  2004-04-09 16:51 -------
> I believe the socket should be closed when GCed.
Be very careful here. Sockets are not closed when GC'ed. They're closed when
finalized (as implemented in java.net.PlainSocket). Yes, the distinction is
subtle, but an important one.
You can somewhat rely on an object being GC'ed, but you absolutely cannot rely
on an object being finalized (in a timeframe that matters).
I'm not sure if this is the right place to go into the details, but if the
statement above is not clear, I'll be happy to demonstrate with a piece of code.
In short, I think it would be a very bad idea not to close the socket explicitly.

Thanks
Moh

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Mime
View raw message