mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
fix(Postgres Node): Tunnel doesn't always close (#7087)
This commit is contained in:
@@ -135,7 +135,7 @@ const properties: INodeProperties[] = [
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
'@version': [2.2],
|
||||
'@version': [2.2, 2.3],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -172,7 +172,7 @@ const properties: INodeProperties[] = [
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
'@version': [2.2],
|
||||
'@version': [2.2, 2.3],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -171,7 +171,7 @@ const properties: INodeProperties[] = [
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
'@version': [2.2],
|
||||
'@version': [2.2, 2.3],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -47,7 +47,7 @@ export async function getMappingColumns(
|
||||
): Promise<ResourceMapperFields> {
|
||||
const credentials = await this.getCredentials('postgres');
|
||||
|
||||
const { db } = await configurePostgres(credentials);
|
||||
const { db, sshClient } = await configurePostgres(credentials);
|
||||
|
||||
const schema = this.getNodeParameter('schema', 0, {
|
||||
extractValue: true,
|
||||
@@ -88,5 +88,10 @@ export async function getMappingColumns(
|
||||
return { fields };
|
||||
} catch (error) {
|
||||
throw error;
|
||||
} finally {
|
||||
if (sshClient) {
|
||||
sshClient.end();
|
||||
}
|
||||
await db.$pool.end();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user