activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1031761 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
Date Fri, 05 Nov 2010 20:05:18 GMT
Author: gtully
Date: Fri Nov  5 20:05:18 2010
New Revision: 1031761

URL: http://svn.apache.org/viewvc?rev=1031761&view=rev
Log:
allow a 0 closeTimeout to mean infinite, currently it turns the sync request into an async
request

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java?rev=1031761&r1=1031760&r2=1031761&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
Fri Nov  5 20:05:18 2010
@@ -1318,7 +1318,9 @@ public class ActiveMQConnection implemen
 	private Response doSyncSendPacket(Command command, int timeout)
 			throws JMSException {
 		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()) {
 		        ExceptionResponse er = (ExceptionResponse)response;
 		        if (er.getException() instanceof JMSException) {



Mime
View raw message