Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Remove netconf from commons/opendaylight pom
[controller.git]
/
opendaylight
/
netconf
/
netconf-netty-util
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
netconf
/
nettyutil
/
handler
/
ssh
/
client
/
AsyncSshHandler.java
diff --git
a/opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/client/AsyncSshHandler.java
b/opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/client/AsyncSshHandler.java
index 064ae72bc7c512db762a45007a73e9aeebebbe45..c89da4984a409c507a3c2644ed0671b7a1f4daba 100644
(file)
--- a/
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/client/AsyncSshHandler.java
+++ b/
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/client/AsyncSshHandler.java
@@
-15,6
+15,7
@@
import io.netty.channel.ChannelOutboundHandlerAdapter;
import io.netty.channel.ChannelPromise;
import java.io.IOException;
import java.net.SocketAddress;
import io.netty.channel.ChannelPromise;
import java.io.IOException;
import java.net.SocketAddress;
+import java.util.HashMap;
import org.apache.sshd.ClientChannel;
import org.apache.sshd.ClientSession;
import org.apache.sshd.SshClient;
import org.apache.sshd.ClientChannel;
import org.apache.sshd.ClientSession;
import org.apache.sshd.SshClient;
@@
-39,7
+40,16
@@
public class AsyncSshHandler extends ChannelOutboundHandlerAdapter {
public static final int SSH_DEFAULT_NIO_WORKERS = 8;
public static final int SSH_DEFAULT_NIO_WORKERS = 8;
+ // Disable default timeouts from mina sshd
+ private static final long DEFAULT_TIMEOUT = -1L;
+
static {
static {
+ DEFAULT_CLIENT.setProperties(new HashMap<String, String>(){
+ {
+ put(SshClient.AUTH_TIMEOUT, Long.toString(DEFAULT_TIMEOUT));
+ put(SshClient.IDLE_TIMEOUT, Long.toString(DEFAULT_TIMEOUT));
+ }
+ });
// TODO make configurable, or somehow reuse netty threadpool
DEFAULT_CLIENT.setNioWorkers(SSH_DEFAULT_NIO_WORKERS);
DEFAULT_CLIENT.start();
// TODO make configurable, or somehow reuse netty threadpool
DEFAULT_CLIENT.setNioWorkers(SSH_DEFAULT_NIO_WORKERS);
DEFAULT_CLIENT.start();