Fixed a bunch of MySQL pooling issues where connections were not properly released or were double-released

This commit is contained in:
Andris Reinman 2016-04-05 15:29:42 +03:00
parent 06d2712916
commit 0392473ecd
8 changed files with 10 additions and 13 deletions

View file

@ -605,7 +605,6 @@ module.exports.subscribers = (id, onlySubscribed, callback) => {
}
db.getConnection((err, connection) => {
connection.release();
if (err) {
return callback(err);
}
@ -618,6 +617,7 @@ module.exports.subscribers = (id, onlySubscribed, callback) => {
}
connection.query(query, queryData.values, (err, rows) => {
connection.release();
if (err) {
return callback(err);
}