1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00

chore: mark private variables as such and remove obsolete ones

This commit is contained in:
Ruben Bridgewater
2017-05-28 07:15:20 +02:00
parent ba7a39c443
commit b2e18344d9
21 changed files with 179 additions and 165 deletions

View File

@ -47,7 +47,7 @@ function reconnect (client, why, error) {
debug('Redis connection is gone from %s event.', why)
client.connected = false
client.ready = false
client.pubSubMode = 0
client._pubSubMode = 0
client.emit('end')
@ -63,7 +63,7 @@ function reconnect (client, why, error) {
}
// If client is a requested shutdown, then don't retry
if (client.closing) {
if (client._closing) {
debug('Connection ended by quit / end command, not retrying.')
flushAndError(client, 'Stream connection ended and command aborted.', 'NR_CLOSED', {
error
@ -94,7 +94,7 @@ function reconnect (client, why, error) {
}
// Retry commands after a reconnect instead of throwing an error. Use this with caution
if (client.options.retryUnfulfilledCommands) {
if (client._options.retryUnfulfilledCommands) {
client.offlineQueue.unshift.apply(client.offlineQueue, client.commandQueue.toArray())
client.commandQueue.clear()
// TODO: If only the pipelineQueue contains the error we could improve the situation.