As discussed on IRC, when doing something like:
client.unsubscribe();
client.quit();
The client raises an exception:
Error: subscriptions are active but got an invalid reply: OK
at RedisClient.return_reply (/usr/local/lib/node_modules/redis/index.js:417:19)
at RedisReplyParser. (/usr/local/lib/node_modules/redis/index.js:87:14)
at RedisReplyParser.emit (events.js:64:17)
at RedisReplyParser.send_reply (/usr/local/lib/node_modules/redis/lib/parser/javascript.js:266:18)
at RedisReplyParser.execute (/usr/local/lib/node_modules/redis/lib/parser/javascript.js:120:22)
at RedisClient.on_data (/usr/local/lib/node_modules/redis/index.js:328:27)
at Socket. (/usr/local/lib/node_modules/redis/index.js:99:14)
at Socket.emit (events.js:64:17)
at Socket._onReadable (net.js:672:14)
at IOWatcher.onReadable [as callback] (net.js:177:10)
Removing the call to quit fixes this, but I don't know if it destroys the socket.
As discussed on IRC, when doing something like:
The client raises an exception:
Removing the call to
quitfixes this, but I don't know if it destroys the socket.