-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: this.subClient.psubscribe is not a function #411
Comments
No idea what happens here ? |
Since version const pubClient = createClient({ host: "localhost", port: 6379 });
const subClient = pubClient.duplicate();
io.adapter(redisAdapter(pubClient, subClient)); Which in your case should give: module.exports = class OurOwnRedisAdapter extends RedisAdapter {
constructor(nsp) {
const subClient = pubClient.duplicate();
const options = Object.assign({
requestsTimeout: 1000
}, config.websocket.adapter);
super(nsp, pubClient, subClient, options);
}
...
} |
This error happens when using 'redis' version 4.x.x, install version 3.x.x which works correctly. |
This was bad timing for some of us who weren't aware of node redis v4 being a brand new thing 😄 I downgraded to v3 and it's working fine. |
Hi,
We've just upgraded redis adapter and ioredis to the latest version:
We using RedisAdapter extended:
Our pubClient is created like this:
And now we get this error that is difficult to know why.
The text was updated successfully, but these errors were encountered: