不要怂,就是干,撸起袖子干!

Commit 3686e571 by Dejan Ranisavljevic

Destroy read and write pool connections, once they are drained.

1 parent 40cf6bf5
Showing with 4 additions and 1 deletions
......@@ -44,10 +44,13 @@ ConnectionManager = function(dialect, sequelize) {
};
ConnectionManager.prototype.onProcessExit = function() {
var self = this
var self = this;
if (this.pool) {
this.pool.drain(function() {
if (self.pool.read) self.pool.read.destroyAllNow();
if (self.pool.write) self.pool.write.destroyAllNow();
self.pool.destroyAllNow();
});
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!