🐛 Fix issue that connections did not get closed

This commit is contained in:
Jan Oberhauser 2020-04-08 08:43:16 +02:00
parent 1e2f24326a
commit a00c9e0efb
2 changed files with 4 additions and 0 deletions

View file

@ -245,9 +245,12 @@ export class MySql implements INodeType {
returnItems = this.helpers.returnJsonArray(queryResult as IDataObject[]);
} else {
await connection.end();
throw new Error(`The operation "${operation}" is not supported!`);
}
await connection.end();
return this.prepareOutputData(returnItems);
}
}

View file

@ -325,6 +325,7 @@ export class Postgres implements INodeType {
returnItems = this.helpers.returnJsonArray(updateItems as IDataObject[]);
} else {
await pgp.end();
throw new Error(`The operation "${operation}" is not supported!`);
}