This commit is contained in:
Jan Prochazka
2021-02-15 18:37:13 +01:00
parent 6a28ceaa51
commit b2e37e88ea

View File

@@ -9,6 +9,9 @@ async function connectUtility(driver, storedConnection) {
const connection = { const connection = {
...decryptConnection(storedConnection), ...decryptConnection(storedConnection),
}; };
if (!connection.port && driver.defaultPort) connection.port = driver.defaultPort.toString();
if (connection.useSshTunnel) { if (connection.useSshTunnel) {
const tunnel = await getSshTunnelProxy(connection); const tunnel = await getSshTunnelProxy(connection);
if (tunnel.state == 'error') { if (tunnel.state == 'error') {
@@ -19,8 +22,6 @@ async function connectUtility(driver, storedConnection) {
connection.port = tunnel.localPort; connection.port = tunnel.localPort;
} }
if (!connection.port && driver.defaultPort) connection.port = driver.defaultPort.toString();
// SSL functionality - copied from https://github.com/beekeeper-studio/beekeeper-studio // SSL functionality - copied from https://github.com/beekeeper-studio/beekeeper-studio
if (connection.useSsl) { if (connection.useSsl) {
connection.ssl = {}; connection.ssl = {};