Early return instead of if/else
As suggested in review comment.
This commit is contained in:
parent
7277143c27
commit
bf1d5bf3b4
@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user