mirror of https://github.com/apache/activemq.git
allow a 0 closeTimeout to mean infinite, currently it turns the sync request into an async request
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1031761 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2bdddc2021
commit
b6a9c70ef0
|
@ -1318,7 +1318,9 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon
|
||||||
private Response doSyncSendPacket(Command command, int timeout)
|
private Response doSyncSendPacket(Command command, int timeout)
|
||||||
throws JMSException {
|
throws JMSException {
|
||||||
try {
|
try {
|
||||||
Response response = (Response)this.transport.request(command, timeout);
|
Response response = (Response) (timeout > 0
|
||||||
|
? this.transport.request(command, timeout)
|
||||||
|
: this.transport.request(command));
|
||||||
if (response != null && response.isException()) {
|
if (response != null && response.isException()) {
|
||||||
ExceptionResponse er = (ExceptionResponse)response;
|
ExceptionResponse er = (ExceptionResponse)response;
|
||||||
if (er.getException() instanceof JMSException) {
|
if (er.getException() instanceof JMSException) {
|
||||||
|
|
Loading…
Reference in New Issue