Bug 5475 - File descriptor leak on netconf connector reconnects 56/36156/5
authoradetalhouet <adetalhouet@inocybe.com>
Thu, 17 Mar 2016 23:11:32 +0000 (19:11 -0400)
committerAlexis de Talhouët <adetalhouet@inocybe.com>
Fri, 18 Mar 2016 17:50:00 +0000 (17:50 +0000)
Do not start the SshClient each time the AsyncSshHandler is instantiated.

http://mail-archives.apache.org/mod_mbox/mina-users/201603.mbox/%3CCAA66TprZd754Ry8wMYgS7kOJc8%3DvZNP3MA41VYZyVi_oQSv6yw%40mail.gmail.com%3E

Change-Id: I6c70fa669dfceadeaa0b388894f7042bb44fc586
Signed-off-by: adetalhouet <adetalhouet@inocybe.com>
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/handler/ssh/client/AsyncSshHandler.java

index ca654c6fdb6c6796a4c663564fdadbdd409d62ca..1798934957adc5b74ccbc3edb7491ca302479b2c 100644 (file)
@@ -81,8 +81,6 @@ public class AsyncSshHandler extends ChannelOutboundHandlerAdapter {
     public AsyncSshHandler(final AuthenticationHandler authenticationHandler, final SshClient sshClient) throws IOException {
         this.authenticationHandler = Preconditions.checkNotNull(authenticationHandler);
         this.sshClient = Preconditions.checkNotNull(sshClient);
-        // Start just in case
-        sshClient.start();
     }
 
     public static AsyncSshHandler createForNetconfSubsystem(final AuthenticationHandler authenticationHandler) throws IOException {