[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oleg Kalnichevski resolved HTTPCLIENT-599.
------------------------------------------

    Resolution: Won't Fix

Neil,

The recommended way of going about this issue with the 4.0 API is to subclass 
the default connection implementation, override the #shutdown() method and 
implement whatever custom shutdown logic is required.  

Oleg

> Not possible to set socket lingering on with a socket linger time of 0
> ----------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-599
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-599
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 3.0.1
>         Environment: Windows XP, Sun JVM 1.5.0_07
>            Reporter: Neil Ferguson
>            Priority: Minor
>             Fix For: 4.0 Alpha 2
>
>
> In version 3.0.1 of the Commons HTTP Client it is not possible to set socket 
> lingering on, but with a socket linger time of 0. This may not appear to make 
> much sense, but (certainly with the Sun JVM) this is used to force abortive 
> connection release (see: 
> http://java.sun.com/j2se/1.5.0/docs/guide/net/articles/connection_release.html).
>  
> In the org.apache.commons.httpclient.HttpConnection.open() method the 
> following code is what prevents this:
> if (linger > 0) {
>     socket.setSoLinger(linger > 0, linger);
> }
> I have changed this to:
> if (linger >= 0) {
>     socket.setSoLinger(linger >= 0, linger);
> }
> However this changes the meaning of the http.socket.linger parameter, so this 
> may not be the preferred solution. Perhaps turning socket lingering on and 
> off needs to be configured independently of the socket linger time.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to