mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 13:27:31 -08:00
🐛 Fix issue that connections did not get closed
This commit is contained in:
parent
1e2f24326a
commit
a00c9e0efb
|
@ -245,9 +245,12 @@ export class MySql implements INodeType {
|
||||||
returnItems = this.helpers.returnJsonArray(queryResult as IDataObject[]);
|
returnItems = this.helpers.returnJsonArray(queryResult as IDataObject[]);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
await connection.end();
|
||||||
throw new Error(`The operation "${operation}" is not supported!`);
|
throw new Error(`The operation "${operation}" is not supported!`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await connection.end();
|
||||||
|
|
||||||
return this.prepareOutputData(returnItems);
|
return this.prepareOutputData(returnItems);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -325,6 +325,7 @@ export class Postgres implements INodeType {
|
||||||
returnItems = this.helpers.returnJsonArray(updateItems as IDataObject[]);
|
returnItems = this.helpers.returnJsonArray(updateItems as IDataObject[]);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
await pgp.end();
|
||||||
throw new Error(`The operation "${operation}" is not supported!`);
|
throw new Error(`The operation "${operation}" is not supported!`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue