Increase IDLE timeout for ssh netconf server 28/16828/1
authorMaros Marsalek <mmarsale@cisco.com>
Thu, 19 Mar 2015 14:21:17 +0000 (15:21 +0100)
committerMaros Marsalek <mmarsale@cisco.com>
Thu, 19 Mar 2015 14:22:10 +0000 (15:22 +0100)
We might consider doing unlimitted idle, mina ssh library needs to be checked.

Change-Id: Ia36f61fd89d1d9690e5f6a438247fde0be209404
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
opendaylight/netconf/netconf-ssh/src/main/java/org/opendaylight/controller/netconf/ssh/osgi/NetconfSSHActivator.java

index b098329..23c92e8 100644 (file)
@@ -19,7 +19,6 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.TimeUnit;
 import org.apache.commons.io.FilenameUtils;
 import org.apache.sshd.common.util.ThreadUtils;
 import org.apache.sshd.server.keyprovider.PEMGeneratorHostKeyProvider;
@@ -38,7 +37,7 @@ public class NetconfSSHActivator implements BundleActivator {
     private static final java.lang.String ALGORITHM = "RSA";
     private static final int KEY_SIZE = 4096;
     public static final int POOL_SIZE = 8;
-    private static final int DEFAULT_IDLE_TIMEOUT = (int) TimeUnit.MINUTES.toMillis(20);
+    private static final int DEFAULT_IDLE_TIMEOUT = Integer.MAX_VALUE;
 
     private ScheduledExecutorService minaTimerExecutor;
     private NioEventLoopGroup clientGroup;