Skip to content
This repository was archived by the owner on Jul 30, 2019. It is now read-only.

Commit 00149ba

Browse files
author
emac
committed
bug fix: avoid wrong local port increment
1 parent aa49757 commit 00149ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/m11n/jdbc/ssh/SshTunnel.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public void start() {
9494
nextPort = localPort.incrementAndGet();
9595
}
9696

97-
assignedPort = session.setPortForwardingL(localPort.incrementAndGet(), forwardHost, remotePort);
97+
assignedPort = session.setPortForwardingL(nextPort, forwardHost, remotePort);
9898

9999
if(logger.isDebugEnabled()) {
100100
logger.debug("Server version: {}", session.getServerVersion());

0 commit comments

Comments
 (0)