qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kw...@apache.org
Subject svn commit: r1659576 - in /qpid/branches/QPID-6262-JavaBrokerNIO/qpid/java/broker-core/src/main/java/org/apache/qpid/server: protocol/MultiVersionProtocolEngine.java transport/NonBlockingConnection.java
Date Fri, 13 Feb 2015 14:39:48 GMT
Author: kwall
Date: Fri Feb 13 14:39:48 2015
New Revision: 1659576

URL: http://svn.apache.org/r1659576
Log:
Fix failing SSL test owing to missed wakeup

Modified:
    qpid/branches/QPID-6262-JavaBrokerNIO/qpid/java/broker-core/src/main/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngine.java
    qpid/branches/QPID-6262-JavaBrokerNIO/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/NonBlockingConnection.java

Modified: qpid/branches/QPID-6262-JavaBrokerNIO/qpid/java/broker-core/src/main/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngine.java
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-6262-JavaBrokerNIO/qpid/java/broker-core/src/main/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngine.java?rev=1659576&r1=1659575&r2=1659576&view=diff
==============================================================================
--- qpid/branches/QPID-6262-JavaBrokerNIO/qpid/java/broker-core/src/main/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngine.java
(original)
+++ qpid/branches/QPID-6262-JavaBrokerNIO/qpid/java/broker-core/src/main/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngine.java
Fri Feb 13 14:39:48 2015
@@ -25,6 +25,7 @@ import java.net.InetSocketAddress;
 import java.net.SocketAddress;
 import java.nio.ByteBuffer;
 import java.util.Set;
+import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicReference;
 
 import javax.security.auth.Subject;
@@ -383,6 +384,7 @@ public class MultiVersionProtocolEngine
     {
         private final ByteBuffer _header = ByteBuffer.allocate(MINIMUM_REQUIRED_HEADER_BYTES);
         private long _lastReadTime = System.currentTimeMillis();
+        private final AtomicBoolean _hasWork = new AtomicBoolean();
 
         public SocketAddress getRemoteAddress()
         {
@@ -424,13 +426,13 @@ public class MultiVersionProtocolEngine
         @Override
         public boolean hasWork()
         {
-            return false;
+            return _hasWork.get();
         }
 
         @Override
         public void notifyWork()
         {
-
+            _hasWork.set(true);
         }
 
         @Override
@@ -442,7 +444,7 @@ public class MultiVersionProtocolEngine
         @Override
         public void clearWork()
         {
-
+            _hasWork.set(false);
         }
 
         public void received(ByteBuffer msg)
@@ -533,6 +535,11 @@ public class MultiVersionProtocolEngine
                 }
                 else
                 {
+                    boolean hasWork = _delegate.hasWork();
+                    if (hasWork)
+                    {
+                        newDelegate.notifyWork();
+                    }
                     _delegate = newDelegate;
                     _delegate.setWorkListener(_workListener.get());
                     _header.flip();

Modified: qpid/branches/QPID-6262-JavaBrokerNIO/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/NonBlockingConnection.java
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-6262-JavaBrokerNIO/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/NonBlockingConnection.java?rev=1659576&r1=1659575&r2=1659576&view=diff
==============================================================================
--- qpid/branches/QPID-6262-JavaBrokerNIO/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/NonBlockingConnection.java
(original)
+++ qpid/branches/QPID-6262-JavaBrokerNIO/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/NonBlockingConnection.java
Fri Feb 13 14:39:48 2015
@@ -271,7 +271,7 @@ public class NonBlockingConnection imple
     public boolean doWork()
     {
         _protocolEngine.clearWork();
-        boolean closed = _closed.get();
+        final boolean closed = _closed.get();
         if (!closed)
         {
             try



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


Mime
View raw message