-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
unsubscribe failed when stringNumbers is True #1643
Comments
ioredis: 5.2.3 |
if I pass param const Redis = require("ioredis");
// const redis = new Redis({stringNumbers: false});
const redis = new Redis({stringNumbers: true});
redis.subscribe('xxx', (err, count) => {
// unsubscribe
redis.unsubscribe('xxx').then(r => {
console.log('---unsub succ', r);
// this will raise error "Connection in subscriber mode" too
redis.get('name').then(r => {
console.log('get name: ', r);
});
}).catch(e => {
console.log('===unsub fail', e);
})
}); |
line 157 locates the issue, the reply[2] is string instead of int when |
Ah good catch! Sorry I didn't notice the GitHub notification. Will take a look soon. |
🎉 This issue has been resolved in version 5.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [5.3.0](redis/ioredis@v5.2.6...v5.3.0) (2023-01-25) ### Bug Fixes * unsubscribe not work with stringNumbers ([#1710](redis/ioredis#1710)) ([321f8de](redis/ioredis@321f8de)), closes [#1643](redis/ioredis#1643) ### Features * Add support ssubscribe ([#1690](redis/ioredis#1690)) ([6285e80](redis/ioredis@6285e80))
Hey luin, here is a bug on unsubscribe mode if set
stringNumbers: true
, code like thisif
stringNumbers
is false, wverything goes well,'---unsub succ'
will be logged, but if it is set to true, nothing will be logged and the promise will not be solved.The text was updated successfully, but these errors were encountered: