HTTPCLIENT-1108: connection should get closed if checked back in as non-reusable.

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1148901 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Moore 2011-07-20 19:03:27 +00:00
parent 39a4f616aa
commit 6d517fc723
2 changed files with 1 additions and 2 deletions

View File

@ -464,6 +464,7 @@ public void freeEntry(BasicPoolEntry entry, boolean reusable, long validDuration
entry.updateExpiry(validDuration, timeUnit);
freeConnections.add(entry);
} else {
closeConnection(entry);
rospl.dropEntry();
numConnections--;
}

View File

@ -43,7 +43,6 @@
import org.apache.http.params.BasicHttpParams;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@ -322,7 +321,6 @@ public void closeExpiredConnectionsDoesNotCloseUnexpiredOnes() throws Exception
verify(mockConnection, never()).close();
}
@Ignore
@Test
public void closesNonReusableConnections() throws Exception {
useMockOperator();