1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00

Moving some logic that should fix the idle event

Signed-off-by: DTrejo <david.trejo@voxer.com>
This commit is contained in:
Trae Robrock
2012-06-28 17:13:40 -07:00
committed by DTrejo
parent b60e001fa0
commit 2224767c4c

View File

@@ -525,8 +525,9 @@ function reply_to_strings(reply) {
RedisClient.prototype.return_reply = function (reply) {
var command_obj, obj, i, len, type, timestamp, argindex, args, queue_len;
queue_len = this.command_queue.getLength();
command_obj = this.command_queue.shift()
queue_len = this.command_queue.getLength();
if (this.pub_sub_mode === false && queue_len === 0) {
this.emit("idle");
@@ -537,8 +538,6 @@ RedisClient.prototype.return_reply = function (reply) {
this.should_buffer = false;
}
command_obj = this.command_queue.shift();
if (command_obj && !command_obj.sub_command) {
if (typeof command_obj.callback === "function") {
if (this.options.detect_buffers && command_obj.buffer_args === false) {