Move logging out of try/catch block
[netconf.git] / netconf / netconf-netty-util / src / main / java / org / opendaylight / netconf / nettyutil / handler / ssh / client / AsyncSshHandler.java
index 213b4c13307ab0430d78733c804e8ff4fc15d4be..0d2f6e1aa5aa42868fb6bcec746a87ee168139a9 100644 (file)
@@ -140,10 +140,10 @@ public class AsyncSshHandler extends ChannelOutboundHandlerAdapter {
 
     private synchronized void handleSshAuthenticated(final NettyAwareClientSession newSession,
             final ChannelHandlerContext ctx) {
-        try {
-            LOG.debug("SSH session authenticated on channel: {}, server version: {}", ctx.channel(),
-                    newSession.getServerVersion());
+        LOG.debug("SSH session authenticated on channel: {}, server version: {}", ctx.channel(),
+            newSession.getServerVersion());
 
+        try {
             channel = newSession.createSubsystemChannel(SUBSYSTEM, ctx);
             channel.setStreaming(ClientChannel.Streaming.Async);
             channel.open().addListener(future -> {
@@ -153,8 +153,6 @@ public class AsyncSshHandler extends ChannelOutboundHandlerAdapter {
                     handleSshSetupFailure(ctx, future.getException());
                 }
             });
-
-
         } catch (final IOException e) {
             handleSshSetupFailure(ctx, e);
         }