activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cshan...@apache.org
Subject activemq git commit: https://issues.apache.org/jira/browse/AMQ-6153
Date Mon, 08 Feb 2016 16:14:30 GMT
Repository: activemq
Updated Branches:
  refs/heads/activemq-5.13.x 4782feb6a -> 0715d09a9


https://issues.apache.org/jira/browse/AMQ-6153

Only setting the socketBufferSize in TcpTransport if the value is
greater than 0 as other values are illegal.

(cherry picked from commit 90726a60afffa0bff6db74b15340152ebe1d5082)


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/0715d09a
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/0715d09a
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/0715d09a

Branch: refs/heads/activemq-5.13.x
Commit: 0715d09a95c803a8cbe83caa212e5ec1c779f2b2
Parents: 4782feb
Author: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Authored: Mon Feb 8 16:11:55 2016 +0000
Committer: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Committed: Mon Feb 8 16:14:21 2016 +0000

----------------------------------------------------------------------
 .../org/apache/activemq/transport/tcp/TcpTransport.java     | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/0715d09a/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java
b/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java
index 335cde7..60fe283 100755
--- a/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java
+++ b/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java
@@ -453,8 +453,13 @@ public class TcpTransport extends TransportThreadSupport implements Transport,
S
         }
 
         try {
-            sock.setReceiveBufferSize(socketBufferSize);
-            sock.setSendBufferSize(socketBufferSize);
+            //only positive values are legal
+            if (socketBufferSize > 0) {
+                sock.setReceiveBufferSize(socketBufferSize);
+                sock.setSendBufferSize(socketBufferSize);
+            } else {
+                LOG.warn("Socket buffer size was set to {}; Skipping this setting as the
size must be a positive number.", socketBufferSize);
+            }
         } catch (SocketException se) {
             LOG.warn("Cannot set socket buffer size = " + socketBufferSize);
             LOG.debug("Cannot set socket buffer size. Reason: " + se.getMessage() + ". This
exception is ignored.", se);


Mime
View raw message