Skip to content

Error on client.quit() after client.unsubscribe() #87

Description

@cloudhead

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions