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:
Oleg Kalnichevski 2014-04-23 09:41:11 +00:00
parent 64fade92df
commit 92b5d6d09d
1 changed files with 1 additions and 1 deletions

View File

@ -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()) {