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

Merge branch 'master' of https://github.com/squamos/node_redis into squamos-master

This commit is contained in:
Bryce Baril
2013-05-05 09:50:58 -07:00

View File

@@ -118,7 +118,13 @@ RedisClient.prototype.flush_and_error = function (message) {
while (this.offline_queue.length > 0) {
command_obj = this.offline_queue.shift();
if (typeof command_obj.callback === "function") {
command_obj.callback(message);
try {
command_obj.callback(message);
} catch (callback_err) {
process.nextTick(function () {
throw callback_err;
});
}
}
}
this.offline_queue = new Queue();
@@ -126,7 +132,13 @@ RedisClient.prototype.flush_and_error = function (message) {
while (this.command_queue.length > 0) {
command_obj = this.command_queue.shift();
if (typeof command_obj.callback === "function") {
command_obj.callback(message);
try {
command_obj.callback(message);
} catch (callback_err) {
process.nextTick(function () {
throw callback_err;
});
}
}
}
this.command_queue = new Queue();