Early return instead of if/else

As suggested in review comment.
This commit is contained in:
Rafa de la Torre 2018-07-30 12:31:57 +02:00
parent 7277143c27
commit bf1d5bf3b4

View File

@ -27,11 +27,10 @@ module.exports.resetPgBouncerConnections = function (callback) {
client.query('PAUSE', (err, res) => {
if (err) {
return callback(err);
} else {
client.query('RESUME', (err, res) => {
client.end();
return callback(err);
});
}
client.query('RESUME', (err, res) => {
client.end();
return callback(err);
});
});
}