X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fimpl%2Fosgi%2FNetconfImplActivator.java;h=b8dc9550c7f1fff5b4a544d3be0bc68f07f6d235;hp=abebacf974d0527b72d6479fb2e83796e18aedd4;hb=f04d241578740473fc8b9f17fe38db6f8ea17f02;hpb=66bb5943ab1aad5d4b969a8a75c382c7590fb181 diff --git a/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/osgi/NetconfImplActivator.java b/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/osgi/NetconfImplActivator.java index abebacf974..b8dc9550c7 100644 --- a/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/osgi/NetconfImplActivator.java +++ b/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/osgi/NetconfImplActivator.java @@ -26,6 +26,7 @@ import java.lang.management.ManagementFactory; import java.net.InetSocketAddress; import java.util.Dictionary; import java.util.Hashtable; +import java.util.concurrent.TimeUnit; public class NetconfImplActivator implements BundleActivator { @@ -48,8 +49,9 @@ public class NetconfImplActivator implements BundleActivator { SessionIdProvider idProvider = new SessionIdProvider(); timer = new HashedWheelTimer(); + long connectionTimeoutMillis = NetconfConfigUtil.extractTimeoutMillis(context); NetconfServerSessionNegotiatorFactory serverNegotiatorFactory = new NetconfServerSessionNegotiatorFactory( - timer, factoriesListener, idProvider); + timer, factoriesListener, idProvider, connectionTimeoutMillis); commitNot = new DefaultCommitNotificationProducer(ManagementFactory.getPlatformMBeanServer()); @@ -87,7 +89,7 @@ public class NetconfImplActivator implements BundleActivator { logger.info("Shutting down netconf because YangStoreService service was removed"); commitNot.close(); - eventLoopGroup.shutdownGracefully(); + eventLoopGroup.shutdownGracefully(0, 1, TimeUnit.SECONDS); timer.stop(); regMonitoring.unregister();