Skip to content

Commit

Permalink
index.js: fix enable_offline_queue default. tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
DTrejo committed Jul 6, 2012
1 parent a532e65 commit 1b0b2dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.js
Expand Up @@ -50,7 +50,11 @@ function RedisClient(stream, options) {
if (options.connect_timeout && !isNaN(options.connect_timeout) && options.connect_timeout > 0) {
this.connect_timeout = +options.connect_timeout;
}
this.enable_offline_queue = this.options.enable_offline_queue || true;

this.enable_offline_queue = true;
if (typeof this.options.enable_offline_queue === "boolean") {
this.enable_offline_queue = this.options.enable_offline_queue;
}

this.initialize_retry_vars();
this.pub_sub_mode = false;
Expand Down
3 changes: 3 additions & 0 deletions test.js
Expand Up @@ -1415,6 +1415,9 @@ tests.ENABLE_OFFLINE_QUEUE_FALSE = function () {
cli.set(name, name, function (err) {
// should callback with an error
assert.ok(err);
setTimeout(function () {
next(name);
}, 50);
});
});
};
Expand Down

0 comments on commit 1b0b2dc

Please sign in to comment.