We are catching just IOException, there is no point to include logging
in the block.
Change-Id: I4650513ea444b506068182586153a627bfaff2b9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
private synchronized void handleSshAuthenticated(final NettyAwareClientSession newSession,
final ChannelHandlerContext ctx) {
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());
channel = newSession.createSubsystemChannel(SUBSYSTEM, ctx);
channel.setStreaming(ClientChannel.Streaming.Async);
channel.open().addListener(future -> {
channel = newSession.createSubsystemChannel(SUBSYSTEM, ctx);
channel.setStreaming(ClientChannel.Streaming.Async);
channel.open().addListener(future -> {
handleSshSetupFailure(ctx, future.getException());
}
});
handleSshSetupFailure(ctx, future.getException());
}
});
} catch (final IOException e) {
handleSshSetupFailure(ctx, e);
}
} catch (final IOException e) {
handleSshSetupFailure(ctx, e);
}