Always return client to pool

This commit is contained in:
Raul Ochoa 2016-10-11 18:30:35 +02:00
parent e4b1711e8e
commit d15c7ab0de

View File

@ -19,12 +19,13 @@ JobPublisher.prototype.publish = function (host) {
}
client.publish(self.channel, host, function (err) {
self.pool.release(DB, client);
if (err) {
return error('Error publishing to ' + self.channel + ':' + host + ', ' + err.message);
}
debug('publish to ' + self.channel + ':' + host);
self.pool.release(DB, client);
});
});
};