mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(Postgres Node): Tunnel doesn't always close (#7087)
This commit is contained in:
@@ -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