BUG-2668: Handshake Exception 01/21801/1
authorMichal Rehak <mirehak@cisco.com>
Tue, 2 Jun 2015 09:01:47 +0000 (11:01 +0200)
committerAnil Vishnoi <vishnoianil@gmail.com>
Wed, 3 Jun 2015 16:37:55 +0000 (16:37 +0000)
 - fixing bunch of exception by checking connection state before
   processing fist hello message from device

Change-Id: I8fcf9e9eeeb163e4fee30e9dabef810aabf1bf67
Signed-off-by: Michal Rehak <mirehak@cisco.com>
(cherry picked from commit 3b1e6fb5a6649abe7df47d2b3bb181229cb5cbc1)

openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/ConnectionConductorImpl.java

index a7c8ee63aeeb1a7f408b64fa50f0c595e00aad50..99683bf2c8cacede220b6d46f07ee4ba42a2749d 100644 (file)
@@ -446,6 +446,7 @@ public class ConnectionConductorImpl implements OpenflowProtocolListener,
     public void onConnectionReady() {
         LOG.debug("connection is ready-to-use");
         if (!firstHelloProcessed) {
+            checkState(CONDUCTOR_STATE.HANDSHAKING);
             HandshakeStepWrapper handshakeStepWrapper = new HandshakeStepWrapper(
                     null, handshakeManager, connectionAdapter);
             hsPool.execute(handshakeStepWrapper);