Skip to content

Commit

Permalink
dbeaver/dbeaver#12430 Make session invalidation working for simple ca…
Browse files Browse the repository at this point in the history
…ses (#2463)
  • Loading branch information
ShadelessFox authored Mar 19, 2024
1 parent eea26a5 commit 06089af
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
import org.jkiss.dbeaver.model.net.DBWHandlerType;
import org.jkiss.dbeaver.model.net.DBWNetworkHandler;
import org.jkiss.dbeaver.model.net.DBWTunnel;
import org.jkiss.dbeaver.model.net.ssh.SSHImplementation;
import org.jkiss.dbeaver.model.net.ssh.SSHSession;
import org.jkiss.dbeaver.model.rm.RMProjectType;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.model.secret.DBSSecretController;
Expand Down Expand Up @@ -765,12 +765,11 @@ public WebNetworkEndpointInfo testNetworkHandler(@NotNull WebSession webSession,
tunnel.initializeHandler(monitor, configuration, connectionConfig);
monitor.worked(1);
// Get info
Object implementation = tunnel.getImplementation();
if (implementation instanceof SSHImplementation) {
if (tunnel.getImplementation() instanceof SSHSession session) {
return new WebNetworkEndpointInfo(
"Connected",
((SSHImplementation) implementation).getClientVersion(),
((SSHImplementation) implementation).getServerVersion());
session.getClientVersion(),
session.getServerVersion());
} else {
return new WebNetworkEndpointInfo("Connected");
}
Expand Down

0 comments on commit 06089af

Please sign in to comment.