qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgodf...@apache.org
Subject svn commit: r1631320 - /qpid/branches/QPID-6125-ProtocolRefactoring/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolEngine.java
Date Mon, 13 Oct 2014 09:06:12 GMT
Author: rgodfrey
Date: Mon Oct 13 09:06:11 2014
New Revision: 1631320

URL: http://svn.apache.org/r1631320
Log:
Fix the invalid channel proxy case

Modified:
    qpid/branches/QPID-6125-ProtocolRefactoring/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolEngine.java

Modified: qpid/branches/QPID-6125-ProtocolRefactoring/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolEngine.java
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-6125-ProtocolRefactoring/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolEngine.java?rev=1631320&r1=1631319&r2=1631320&view=diff
==============================================================================
--- qpid/branches/QPID-6125-ProtocolRefactoring/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolEngine.java
(original)
+++ qpid/branches/QPID-6125-ProtocolRefactoring/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolEngine.java
Mon Oct 13 09:06:11 2014
@@ -1108,12 +1108,11 @@ public class AMQProtocolEngine implement
             {
                 _logger.error("Exception caught in " + this + ", closing connection explicitly:
" + throwable, throwable);
 
-
-                ConnectionCloseBody closeBody = _methodRegistry.createConnectionCloseBody(200,
+                ConnectionCloseBody closeBody = _methodRegistry.createConnectionCloseBody(AMQConstant.INTERNAL_ERROR.getCode(),
                                                                                         
    AMQShortString.validValueOf(
                                                                                         
            throwable.getMessage()),
-                                                                                        
    0,
-                                                                                        
    0);
+                                                                                        
    _currentClassId,
+                                                                                        
    _currentMethodId);
 
                 writeFrame(closeBody.generateFrame(0));
 
@@ -1790,8 +1789,17 @@ public class AMQProtocolEngine implement
                         public Object invoke(final Object proxy, final Method method, final
Object[] args)
                                 throws Throwable
                         {
-                            closeConnection(AMQConstant.CHANNEL_ERROR, "Unknown channel id:
" + channelId, channelId);
-
+                            if(method.getName().startsWith("receive"))
+                            {
+                                closeConnection(AMQConstant.CHANNEL_ERROR,
+                                                "Unknown channel id: " + channelId,
+                                                channelId);
+                                return null;
+                            }
+                            else if(method.getName().equals("ignoreAllButCloseOk"))
+                            {
+                                return false;
+                            }
                             return null;
                         }
                     });



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message