tst2005googlecode / step2

Automatically exported from code.google.com/p/step2
1 stars 0 forks source link

Minor issues: unreleased streams in step2-common Java classes #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Parsing the host-meta files (using UrlHostMetaFetcher)
2. Fetching Xrd files (using DefaultHttpFetcher)

Inside DefaultHttpFetcher, the method to getContentAsStream opens an
InputStream, but this InputStream never seems to be released. 

Related to this, inside UrlHostMetaFetcher, this makes a method call that
ultimately calls getContentAsStream, and never seems to be released. 

This might present a slow leakage of resources. 

Original issue reported on code.google.com by tjholod...@gmail.com on 30 Jan 2010 at 12:45

GoogleCodeExporter commented 9 years ago
The connection does get released. getContentAsStream returns an 
EofSensorInputStream
which will close the stream and release the underlying connection. But, there 
is a
bug if the discovery fails the connection fails and all subsequent request will 
fail,
because the apache http client complains that the previous connection has not 
been
released yet. I will raise a separate issue for this.

Original comment by felix.sc...@gmail.com on 7 Feb 2010 at 10:30

GoogleCodeExporter commented 9 years ago
Fixed in http://code.google.com/p/step2/source/detail?r=479

Original comment by balf...@google.com on 9 Feb 2010 at 6:27