You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2010/11/05 21:05:18 UTC

svn commit: r1031761 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java

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) {