globalcache
Advanced tools
Comparing version 2.10.1 to 2.10.2
19
index.js
@@ -142,2 +142,3 @@ var util = require('util'), | ||
//self.emit('error', err); | ||
sendNextMessage(); | ||
}); | ||
@@ -151,2 +152,3 @@ | ||
//self.emit('error', err); | ||
sendNextMessage(); | ||
}); | ||
@@ -186,11 +188,14 @@ | ||
debug && console.log('Delay before going to another item in a queue...'); | ||
setTimeout(function(){ | ||
isSending = false; | ||
// go to the next message in the queue if any | ||
if (messageQueue.length){ | ||
send_(); | ||
} | ||
}, DELAY_BETWEEN_COMMANDS); | ||
setTimeout(sendNextMessage, DELAY_BETWEEN_COMMANDS); | ||
}); | ||
}; | ||
function sendNextMessage(){ | ||
isSending = false; | ||
// go to the next message in the queue if any | ||
if (messageQueue.length){ | ||
send_(); | ||
} | ||
} | ||
this.disconnect = this.end = this.destroy = function (callback) { | ||
@@ -197,0 +202,0 @@ if (this.socket) |
@@ -43,3 +43,3 @@ { | ||
}, | ||
"version": "2.10.1" | ||
"version": "2.10.2" | ||
} |
16152
229