thanx alot! this will really help!!

> Hi Paranoid,
> 
> > in.close(); // this block takes about 48 seconds!!
> > get.releaseConnection();
> > 
> > look at last 2 lines of code. may be i'm doing something wrong? using
> > MultiThreaded and need multi-threaded application. there was something in
> > documentation that i dont need to release
> > connections - HttpClient will try to reuse it. ok, thats good, but what to 
> > do
> > with inputStream.close() ? i dont need even to close inputStream?
> 
> You have to release connections. Always. No reuse unless released.
> 
> If you close the input stream or release the connection, HttpClient
> will try to read data until the response has been received completely.
> That is the only way to keep the connection alive for another request.
> If the server sends a huge response, or takes very long to respond,
> then closing/releasing gracefully will be slow. If you know in advance
> that you don't want to read the full response, disable keep-alive by
> sending a "Connection: close" header with the request. If you decide
> at runtime not to read the rest of the response, you can call
> HttpMethod.abort() to shutdown the streams without reading the rest
> of the response. You still have to release the connection afterwards.
> 
> Always release the connection. Do it in a finally{} block.
> 
> cheers,
>   Roland

    

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to