You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cs...@apache.org on 2016/08/17 13:36:41 UTC
activemq git commit: https://issues.apache.org/jira/browse/AMQ-6397
Repository: activemq
Updated Branches:
refs/heads/master d39fe372e -> 06e929f10
https://issues.apache.org/jira/browse/AMQ-6397
Setting the HTTP timeout for all HttpClients instead of just on send
Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/06e929f1
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/06e929f1
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/06e929f1
Branch: refs/heads/master
Commit: 06e929f1016571f9e5a024e42a4fc5298d9f9684
Parents: d39fe37
Author: Christopher L. Shannon (cshannon) <ch...@gmail.com>
Authored: Wed Aug 17 09:35:18 2016 -0400
Committer: Christopher L. Shannon (cshannon) <ch...@gmail.com>
Committed: Wed Aug 17 09:35:18 2016 -0400
----------------------------------------------------------------------
.../apache/activemq/transport/http/HttpClientTransport.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq/blob/06e929f1/activemq-http/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
----------------------------------------------------------------------
diff --git a/activemq-http/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java b/activemq-http/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
index 7f446c5..a06e7fd 100755
--- a/activemq-http/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
+++ b/activemq-http/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
@@ -124,8 +124,6 @@ public class HttpClientTransport extends HttpTransportSupport {
HttpResponse answer = null;
try {
client = getSendHttpClient();
- HttpParams params = client.getParams();
- HttpConnectionParams.setSoTimeout(params, soTimeout);
answer = client.execute(httpMethod);
int status = answer.getStatusLine().getStatusCode();
if (status != HttpStatus.SC_OK) {
@@ -341,6 +339,10 @@ public class HttpClientTransport extends HttpTransportSupport {
new UsernamePasswordCredentials(getProxyUser(), getProxyPassword()));
}
}
+
+ HttpParams params = client.getParams();
+ HttpConnectionParams.setSoTimeout(params, soTimeout);
+
return client;
}