Closed devmod closed 10 years ago
That's expected – it's creating a second client for pubsub use – but can see that it's confusing... You can initialize a pubsub client directly, and only create a single connection:
pubsub = EM::Hiredis::PubsubClient.new(<host>, <port>).connect
There's not need to unsubscribe before closing the connection.
Understood- that works. Thanks!
Hello,
If im trying to use just the subscription part of pubsub:
Would Hiredis always create two connections to redis?
Meaning I would have to do this to really close them both ?
Also, a related question- do I have to unsubscribe before closing the pubsub connection?
Thanks!