1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

reset subscriptions when the connection is broken

This commit is contained in:
Orion Henry
2010-09-27 17:23:23 -07:00
parent dcbb87dff7
commit 98e27c43dd

View File

@@ -417,6 +417,7 @@ RedisClient.prototype.connection_gone = function (why) {
console.warn("Redis connection is gone from " + why + " event."); console.warn("Redis connection is gone from " + why + " event.");
} }
self.connected = false; self.connected = false;
self.subscriptions = false;
self.emit("end"); self.emit("end");
self.command_queue.forEach(function (args) { self.command_queue.forEach(function (args) {
if (typeof args[2] === "function") { if (typeof args[2] === "function") {