Hello sshd-dev,

Let say I have an SshClient shared across my app, used to establish connection
 to remote devices. Each time the app is attempting a connection, the #start() 
method 
of SshClient is called. Doing so created a FD leak in the app.

So I’m wondering if by design, the SshClient#start() can be called multiple 
time. 
Else, a quick and easy check in the start method to see if already started would
be an easy fix.

More context:
[0]: is the static final definition of the SshClient, where the client is 
started the first time
[1]: and here is where the SshClient is started on each connect attempt

Thanks,
Alexis

[0]: 
https://github.com/opendaylight/netconf/blob/master/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/handler/ssh/client/AsyncSshHandler.java#l46l59
 
<https://github.com/opendaylight/netconf/blob/master/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/handler/ssh/client/AsyncSshHandler.java#l46l59>
[1]: 
https://github.com/opendaylight/netconf/blob/master/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/handler/ssh/client/AsyncSshHandler.java#l89
 
<https://github.com/opendaylight/netconf/blob/master/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/handler/ssh/client/AsyncSshHandler.java#l89>

Reply via email to