Skip to content

Instantly share code, notes, and snippets.

@dvv
Created April 22, 2011 15:23
Show Gist options
  • Save dvv/936878 to your computer and use it in GitHub Desktop.
Save dvv/936878 to your computer and use it in GitHub Desktop.
mget-[].patch
--- index.js.orig 2011-04-22 19:23:57.000000000 +0400
+++ index.js 2011-04-22 19:22:33.000000000 +0400
@@ -473,7 +473,11 @@
return;
}
- if (command === "subscribe" || command === "psubscribe" || command === "unsubscribe" || command === "punsubscribe") {
+ if (command === 'mget' && args.length === 0) {
+ // we skip mget([])
+ if (callback) callback(null, []);
+ return;
+ } else if (command === "subscribe" || command === "psubscribe" || command === "unsubscribe" || command === "punsubscribe") {
if (this.subscriptions === false && exports.debug_mode) {
console.log("Entering pub/sub mode from " + command);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment