HTTPCLIENT-1497: Allow zero SO_LINGER (immediate abortive close)
Contributed by Dmitry Potapov <potapov.d at gmail.com> git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1589359 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
64fade92df
commit
92b5d6d09d
|
@ -129,7 +129,7 @@ public class DefaultHttpClientConnectionOperator implements HttpClientConnection
|
|||
sock.setKeepAlive(socketConfig.isSoKeepAlive());
|
||||
final int linger = socketConfig.getSoLinger();
|
||||
if (linger >= 0) {
|
||||
sock.setSoLinger(linger > 0, linger);
|
||||
sock.setSoLinger(true, linger);
|
||||
}
|
||||
conn.bind(sock);
|
||||
if (this.log.isDebugEnabled()) {
|
||||
|
|
Loading…
Reference in New Issue