fix for BUG 609 07/5807/1
authorMichal Rehak <mirehak@cisco.com>
Fri, 28 Mar 2014 23:06:35 +0000 (16:06 -0700)
committerMichal Rehak <mirehak@cisco.com>
Fri, 28 Mar 2014 23:09:28 +0000 (16:09 -0700)
- extra hello message is being disregarded

Change-Id: Idfe6009c5791d2441c1e5fe5311b75b6927d5f5f
Signed-off-by: Michal Rehak <mirehak@cisco.com>
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/ConnectionConductorImpl.java

index 8bbc8f5fbd6239dd89ca70eb70a628ac94cc740a..f67fe16d512f2d707416cb80ae06c4dbc903d5d1 100644 (file)
@@ -163,8 +163,6 @@ public class ConnectionConductorImpl implements OpenflowProtocolListener,
      *    then continue connection processing. if no common version found, just disconnect.
      * 3. If HelloMessage version is not supported, send HelloMessage with lower supported version.
      * 4. If Hello message received again with not supported version, just disconnect.
-     *
-     *   TODO: Better to handle handshake into a maintainable innerclass which uses State-Pattern.
      */
     @Override
     public synchronized void onHelloMessage(final HelloMessage hello) {
@@ -173,7 +171,7 @@ public class ConnectionConductorImpl implements OpenflowProtocolListener,
         checkState(CONDUCTOR_STATE.HANDSHAKING);
         HandshakeStepWrapper handshakeStepWrapper = new HandshakeStepWrapper(
                 hello, handshakeManager, connectionAdapter);
-        hsPool.execute(handshakeStepWrapper);
+        hsPool.submit(handshakeStepWrapper);
     }
 
     /**
@@ -403,6 +401,7 @@ public class ConnectionConductorImpl implements OpenflowProtocolListener,
         version = negotiatedVersion;
         conductorState = CONDUCTOR_STATE.WORKING;
         OFSessionUtil.registerSession(this, featureOutput, negotiatedVersion);
+        hsPool.shutdownNow();
     }
 
     /*