Skip to content

Commit fe68ee7

Browse files
committed
Fixed issue because of which connection were not getting closed or reused. Hence server side resources were getting exhausted
1 parent 28c8b09 commit fe68ee7

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

java/src/main/java/com/cybersource/ws/client/HttpClientConnection.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,13 @@ void postDocument(Document request)
6060
throws IOException, TransformerConfigurationException,
6161
TransformerException, MalformedURLException,
6262
ProtocolException {
63-
HttpClient httpClient = new HttpClient();
63+
64+
/*
65+
* SimpleHttpConnectionManager(boolean alwaysClose) :
66+
* alwaysClose - if set true, the connection manager will always close connections upon release.
67+
*/
68+
69+
HttpClient httpClient = new HttpClient(new SimpleHttpConnectionManager(true));
6470
setTimeout(httpClient, mc.getTimeout() * 1000);
6571
setProxy(httpClient);
6672

java/src/main/java/com/cybersource/ws/client/Utility.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ private Utility() {
4848
/**
4949
* Version number of this release.
5050
*/
51-
public static final String VERSION = "6.2.3";
51+
public static final String VERSION = "6.2.5";
5252

5353
/**
5454
* If in the Request map, a key called "_has_escapes" is present and is set

0 commit comments

Comments
 (0)