You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
* connection error did not properly trigger reconnection logic [GH-85] * client.hmget(key, [val1, val2]) was not expanding properly [GH-66] * client.quit() while in pub/sub mode would throw an error [GH-87] * client.multi(['hmset', 'key', {foo: 'bar'}]) fails [GH-92]
19 lines
507 B
JavaScript
19 lines
507 B
JavaScript
var client = require("redis").createClient(),
|
|
client2 = require("redis").createClient();
|
|
|
|
client.subscribe("something");
|
|
client.on("subscribe", function (channel, count) {
|
|
console.log("Got sub: " + channel);
|
|
client.unsubscribe("something");
|
|
});
|
|
|
|
client.on("unsubscribe", function (channel, count) {
|
|
console.log("Got unsub: " + channel + ", quitting");
|
|
client.quit();
|
|
});
|
|
|
|
// exercise unsub before sub
|
|
client2.unsubscribe("something");
|
|
client2.subscribe("another thing");
|
|
client2.quit();
|