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

Commit 82e01b5d by Mick Hansen Committed by Jan Aagaard Meier

solve race condition

1 parent df500bed
Showing with 4 additions and 1 deletions
...@@ -117,8 +117,11 @@ module.exports = (function() { ...@@ -117,8 +117,11 @@ module.exports = (function() {
// private // private
var disconnect = function(client) { var disconnect = function(client) {
var self = this var self = this;
if (!this.useQueue) this.client = null;
client.end(function() { client.end(function() {
if (!self.useQueue) return client.destroy();
var intervalObj = null var intervalObj = null
var cleanup = function () { var cleanup = function () {
var retryCt = 0 var retryCt = 0
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!