Skip to content

Commit

Permalink
Refactor SshProxyServer class
Browse files Browse the repository at this point in the history
Adapt SshProxyServer to deal with
apache/mina-sshd#424

JIRA: NETCONF-1267
Change-Id: I254c8fa2563553a22e3197b658bb0c367c51e232
Signed-off-by: Matej Sramcik <matej.sramcik@pantheon.tech>
  • Loading branch information
Sramcik committed Mar 27, 2024
1 parent 9c0fbd4 commit 96a0b35
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@
import org.opendaylight.netconf.shaded.sshd.common.io.IoServiceFactoryFactory;
import org.opendaylight.netconf.shaded.sshd.common.io.nio2.Nio2Acceptor;
import org.opendaylight.netconf.shaded.sshd.common.io.nio2.Nio2Connector;
import org.opendaylight.netconf.shaded.sshd.common.io.nio2.Nio2ServiceFactory;
import org.opendaylight.netconf.shaded.sshd.common.io.nio2.Nio2ServiceFactoryFactory;
import org.opendaylight.netconf.shaded.sshd.common.session.SessionHeartbeatController.HeartbeatType;
import org.opendaylight.netconf.shaded.sshd.common.util.closeable.AbstractCloseable;
import org.opendaylight.netconf.shaded.sshd.common.util.threads.NoCloseExecutor;
import org.opendaylight.netconf.shaded.sshd.core.CoreModuleProperties;
import org.opendaylight.netconf.shaded.sshd.server.SshServer;

Expand Down Expand Up @@ -149,12 +151,14 @@ final ExecutorService resumeTasks() {

@Override
public final IoConnector createConnector(final IoHandler handler) {
return new Nio2Connector(manager, handler, group, resumeTasks);
return new Nio2Connector(new Nio2ServiceFactory(manager, null, new NoCloseExecutor(resumeTasks)),
manager, handler, group, resumeTasks);
}

@Override
public final IoAcceptor createAcceptor(final IoHandler handler) {
return new Nio2Acceptor(manager, handler, group, resumeTasks);
return new Nio2Acceptor(new Nio2ServiceFactory(manager, null, new NoCloseExecutor(resumeTasks)),
manager, handler, group, resumeTasks);
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions third-party/shaded-sshd-jar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
<dependency>
<groupId>org.apache.sshd</groupId>
<artifactId>sshd-osgi</artifactId>
<version>2.11.0</version>
<version>2.12.1</version>
</dependency>
<dependency>
<groupId>org.apache.sshd</groupId>
<artifactId>sshd-netty</artifactId>
<version>2.11.0</version>
<version>2.12.1</version>
<exclusions>
<exclusion>
<groupId>org.apache.sshd</groupId>
Expand Down

0 comments on commit 96a0b35

Please sign in to comment.