You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Add changelog entry and add a note in the readme that detect_buffers does not work in pub sub mode
This commit is contained in:
@@ -182,7 +182,7 @@ port and host are probably fine and you don't need to supply any arguments. `cre
|
||||
* `path`: *null*; The unix socket string to connect to
|
||||
* `parser`: *hiredis*; Which Redis protocol reply parser to use. If `hiredis` is not installed it will fallback to `javascript`.
|
||||
* `return_buffers`: *false*; If set to `true`, then all replies will be sent to callbacks as Buffers instead of Strings.
|
||||
* `detect_buffers`: *false*; If set to `true`, then replies will be sent to callbacks as Buffers
|
||||
* `detect_buffers`: *false*; If set to `true`, then replies will be sent to callbacks as Buffers. Please be aware that this can't work properly with the pubsub mode. A subscriber has to either always return strings or buffers.
|
||||
if any of the input arguments to the original command were Buffers.
|
||||
This option lets you switch between Buffers and Strings on a per-command basis, whereas `return_buffers` applies to
|
||||
every command on a client.
|
||||
|
@@ -23,6 +23,7 @@ Bugfixes
|
||||
- Fixed .multi / .batch used with Node.js 0.10.x not working properly after a reconnect ([@BridgeAR](https://github.com/BridgeAR))
|
||||
- Fixed fired but not yet returned commands not being rejected after a connection loss ([@BridgeAR](https://github.com/BridgeAR))
|
||||
- Fixed connect_timeout not respected if no connection has ever been established ([@gagle](https://github.com/gagle) & [@benjie](https://github.com/benjie))
|
||||
- Fixed return_buffers in pub sub mode ([@komachi](https://github.com/komachi))
|
||||
|
||||
## v.2.2.5 - 18 Oct, 2015
|
||||
|
||||
|
2
index.js
2
index.js
@@ -653,7 +653,7 @@ RedisClient.prototype.return_reply = function (reply) {
|
||||
if (type === 'message') {
|
||||
this.emit('message', reply[1], reply[2]); // channel, message
|
||||
} else if (type === 'pmessage') {
|
||||
this.emit('pmessage', reply[1], reply[2], reply[3]); // pattern, channel, message
|
||||
this.emit('pmessage', reply[1].toString(), reply[2], reply[3]); // pattern, channel, message
|
||||
} else if (type === 'subscribe' || type === 'unsubscribe' || type === 'psubscribe' || type === 'punsubscribe') {
|
||||
if (reply[2] === 0) {
|
||||
this.pub_sub_mode = false;
|
||||
|
Reference in New Issue
Block a user