Make sure that we validated the passed promise to not be null. Also fix
debug output, which would show up null.
Change-Id: Id7490dc57480192f135bf688a973713c3d30ea9c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
@Override
public synchronized void connect(final ChannelHandlerContext ctx, final SocketAddress remoteAddress,
final SocketAddress localAddress, final ChannelPromise promise) throws Exception {
- LOG.debug("SSH session connecting on channel {}. promise: {}", ctx.channel(), connectPromise);
- connectPromise = promise;
+ LOG.debug("SSH session connecting on channel {}. promise: {}", ctx.channel(), promise);
+ connectPromise = requireNonNull(promise);
if (negotiationFuture != null) {
negotiationFutureListener = future -> {