BUG-2475: Fix keepalives not being sent 81/14381/1
authorRobert Varga <rovarga@cisco.com>
Thu, 22 Jan 2015 14:17:38 +0000 (15:17 +0100)
committerRobert Varga <nite@hq.sk>
Thu, 22 Jan 2015 14:25:09 +0000 (14:25 +0000)
As it turns out, we failed to update channel configuration when MD5 keys
were not specified.

Change-Id: I5c2a5983c0797d032bb058974aac82254b554041
Signed-off-by: Robert Varga <rovarga@cisco.com>
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/BGPDispatcherImpl.java

index 7d924de27cf7fbcbb9e9b1100cbc9fcd9c8d6bdf..9d2139bbae09338a6b69d8e3b169fcd16b1a8344 100644 (file)
@@ -127,9 +127,10 @@ public final class BGPDispatcherImpl extends AbstractDispatcher<BGPSessionImpl,
             }
             b.channelFactory(this.cf);
             b.option(MD5ChannelOption.TCP_MD5SIG, this.keys);
-            // Make sure we are doing round-robin processing
-            b.option(ChannelOption.MAX_MESSAGES_PER_READ, 1);
         }
+
+        // Make sure we are doing round-robin processing
+        b.option(ChannelOption.MAX_MESSAGES_PER_READ, 1);
     }
 
     @Override
@@ -140,9 +141,10 @@ public final class BGPDispatcherImpl extends AbstractDispatcher<BGPSessionImpl,
             }
             b.channelFactory(this.scf);
             b.option(MD5ChannelOption.TCP_MD5SIG, this.keys);
-            // Make sure we are doing round-robin processing
-            b.childOption(ChannelOption.MAX_MESSAGES_PER_READ, 1);
         }
+
+        // Make sure we are doing round-robin processing
+        b.childOption(ChannelOption.MAX_MESSAGES_PER_READ, 1);
     }
 
 }