You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Moving some logic that should fix the idle event
Signed-off-by: DTrejo <david.trejo@voxer.com>
This commit is contained in:
7
index.js
7
index.js
@@ -525,8 +525,9 @@ function reply_to_strings(reply) {
|
|||||||
|
|
||||||
RedisClient.prototype.return_reply = function (reply) {
|
RedisClient.prototype.return_reply = function (reply) {
|
||||||
var command_obj, obj, i, len, type, timestamp, argindex, args, queue_len;
|
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) {
|
if (this.pub_sub_mode === false && queue_len === 0) {
|
||||||
this.emit("idle");
|
this.emit("idle");
|
||||||
@@ -537,8 +538,6 @@ RedisClient.prototype.return_reply = function (reply) {
|
|||||||
this.should_buffer = false;
|
this.should_buffer = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
command_obj = this.command_queue.shift();
|
|
||||||
|
|
||||||
if (command_obj && !command_obj.sub_command) {
|
if (command_obj && !command_obj.sub_command) {
|
||||||
if (typeof command_obj.callback === "function") {
|
if (typeof command_obj.callback === "function") {
|
||||||
if (this.options.detect_buffers && command_obj.buffer_args === false) {
|
if (this.options.detect_buffers && command_obj.buffer_args === false) {
|
||||||
|
Reference in New Issue
Block a user