correctly close idle connections #920

This commit is contained in:
SPRINX0\prochazka
2024-10-14 14:03:07 +02:00
parent 06753ff312
commit f80ae284fa
5 changed files with 38 additions and 25 deletions

View File

@@ -67,8 +67,10 @@ const drivers = driverBases.map(driverBase => ({
}
return dbhan;
},
async close(dbhan) {
return dbhan.client.close();
close(dbhan) {
return new Promise(resolve => {
dbhan.client.end(resolve);
});
},
query(dbhan, sql, options) {
if (sql == null) {