Netty Replicator - improve the reconnection and keepalive mechanisms
[mdsal.git] / replicate / mdsal-replicate-netty / src / main / java / org / opendaylight / mdsal / replicate / netty / SinkRequestHandler.java
index 0b65bc16eeeb9a10ac18256eb2df7cbaa9e60707..24904eaaa982bd70138c82202b79e377ff3e0f1c 100644 (file)
@@ -70,6 +70,10 @@ final class SinkRequestHandler extends SimpleChannelInboundHandler<ByteBuf> {
             case Constants.MSG_DTC_APPLY:
                 handleDtcApply();
                 break;
+            case Constants.MSG_PING:
+                LOG.trace("Received PING from Source, sending PONG");
+                ctx.channel().writeAndFlush(Constants.PONG);
+                break;
             default:
                 throw new IllegalStateException("Unexpected message type " + msgType);
         }