You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
chore: add print helper again and refactor some code
Expose the RedisClient directly instead of only being a property
This commit is contained in:
@@ -40,7 +40,7 @@ function onResult (client, reply) {
|
||||
// If in monitor mode, all normal commands are still working and we only want to emit the streamlined commands
|
||||
// As this is not the average use case and monitor is expensive anyway, let's change the code here, to improve
|
||||
// the average performance of all other commands in case of no monitor mode
|
||||
if (client._monitoring) {
|
||||
if (client._monitoring === true) {
|
||||
var replyStr
|
||||
if (client.buffers && Buffer.isBuffer(reply)) {
|
||||
replyStr = reply.toString()
|
||||
@@ -63,6 +63,7 @@ function onResult (client, reply) {
|
||||
} else if (client._pubSubMode !== 1) {
|
||||
client._pubSubMode--
|
||||
normalReply(client, reply)
|
||||
// TODO: Have another look at this if this could be further improved
|
||||
} else if (!(reply instanceof Array) || reply.length <= 2) {
|
||||
// Only PING and QUIT are allowed in this context besides the pub sub commands
|
||||
// Ping replies with ['pong', null|value] and quit with 'OK'
|
||||
|
Reference in New Issue
Block a user