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

Commit a16db0c2 by Dejan Ranisavljevic

Check if destroyAllNow is available before calling.

1 parent 3686e571
Showing with 3 additions and 4 deletions
...@@ -48,10 +48,9 @@ ConnectionManager.prototype.onProcessExit = function() { ...@@ -48,10 +48,9 @@ ConnectionManager.prototype.onProcessExit = function() {
if (this.pool) { if (this.pool) {
this.pool.drain(function() { this.pool.drain(function() {
if (self.pool.read) self.pool.read.destroyAllNow(); if (self.pool.destroyAllNow) self.pool.destroyAllNow();
if (self.pool.write) self.pool.write.destroyAllNow(); if (self.pool.read && self.pool.read.destroyAllNow) self.pool.read.destroyAllNow();
if (self.pool.write && self.pool.write.destroyAllNow) 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!