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

Commit 11f3ea0f by Jan Aagaard Meier

Save a reference to the bound version of onProcessExit so we can properly unbind it

1 parent 47c040a5
Showing with 2 additions and 1 deletions
......@@ -39,7 +39,8 @@ ConnectionManager = function(dialect, sequelize) {
if (config.pool.maxConnections) config.pool.max = config.pool.maxConnections;
if (config.pool.minConnections) config.pool.min = config.pool.minConnections;
process.on('exit', this.onProcessExit.bind(this));
this.onProcessExit = this.onProcessExit.bind(this); // Save a reference to the bound version so we can remove it with removeListener
process.on('exit', this.onProcessExit);
};
ConnectionManager.prototype.onProcessExit = function() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!