fix(MySQL): pool connections not released after MySQL errors, causing endless load animation

This commit is contained in:
Fabio Di Stasio 2021-06-11 15:02:45 +02:00
parent 690a4541f9
commit 4133fc452f
1 changed files with 4 additions and 1 deletions

View File

@ -1429,7 +1429,10 @@ export class MySQLClient extends AntaresCore {
fields: remappedFields,
keys: keysArr
});
}).catch(reject);
}).catch((err) => {
if (isPool) connection.release();
reject(err);
});
});
resultsArr.push({ rows, report, fields, keys, duration });