mirror of https://github.com/apache/activemq.git
Only setting the socketBufferSize in TcpTransport if the value is greater than 0 as other values are illegal.
This commit is contained in:
parent
386210fafe
commit
90726a60af
|
@ -453,8 +453,13 @@ public class TcpTransport extends TransportThreadSupport implements Transport, S
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
sock.setReceiveBufferSize(socketBufferSize);
|
//only positive values are legal
|
||||||
sock.setSendBufferSize(socketBufferSize);
|
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) {
|
} catch (SocketException se) {
|
||||||
LOG.warn("Cannot set socket buffer size = " + socketBufferSize);
|
LOG.warn("Cannot set socket buffer size = " + socketBufferSize);
|
||||||
LOG.debug("Cannot set socket buffer size. Reason: " + se.getMessage() + ". This exception is ignored.", se);
|
LOG.debug("Cannot set socket buffer size. Reason: " + se.getMessage() + ". This exception is ignored.", se);
|
||||||
|
|
Loading…
Reference in New Issue