Hi all,

We've recently upgraded to restlet 2.0 and are facing a number of odd 
'hangs' during our junit testcases.

As far as we can tell now, we're facing some variant of what is 
mentioned here:

http://restlet-discuss.1400322.n2.nabble.com/Suspended-thread-doing-Client-put-td4479317.html

And the answer there is that representations (actually the streams in 
there) should be "exhausted" for sure.


Up to now we were more down the path of following the advise of

http://restlet-discuss.1400322.n2.nabble.com/Problem-with-HttpClient-extension-org-restlet-ext-httpclient-and-unreleased-connections-during-404s-td5284804.html#a5284804

Which points out representations should be "released" properly.
However in our case this doesn't seem to be enough any more.


Quickly scanning the code the biggest difference seems to be that 
streams are completely read-out before being closed in the exhaust().


My questions:
* Should both advises be combined into "assure exhaust _and_ release"?

* (For my interest) Why is reading the stream till the end making a 
difference anyway. What additional resource is cleaned up at the end of 
the stream that isn't/can't be freed upon close()?

* Is there a reason why release() is not automatically including exhaust()


regards,
-marc=

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2647412

Reply via email to