From 92b5d6d09d9705bc69b6ccb77de9df7cf97fb6b7 Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Wed, 23 Apr 2014 09:41:11 +0000 Subject: [PATCH] HTTPCLIENT-1497: Allow zero SO_LINGER (immediate abortive close) Contributed by Dmitry Potapov git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1589359 13f79535-47bb-0310-9956-ffa450edef68 --- .../http/impl/conn/DefaultHttpClientConnectionOperator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/DefaultHttpClientConnectionOperator.java b/httpclient/src/main/java/org/apache/http/impl/conn/DefaultHttpClientConnectionOperator.java index 6bfd16b29..78698c183 100644 --- a/httpclient/src/main/java/org/apache/http/impl/conn/DefaultHttpClientConnectionOperator.java +++ b/httpclient/src/main/java/org/apache/http/impl/conn/DefaultHttpClientConnectionOperator.java @@ -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()) {