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: refactor some code and remove obsolete variable
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
const debug = require('./debug')
|
||||
const Command = require('./command')
|
||||
const utils = require('./utils')
|
||||
|
||||
function onConnect (client) {
|
||||
debug('Stream connected %s id %s', client.address, client.connectionId)
|
||||
@@ -10,14 +11,12 @@ function onConnect (client) {
|
||||
// fast properties. If that's not the case, make them fast properties
|
||||
// again!
|
||||
client.connected = true
|
||||
client.ready = false
|
||||
client.emittedEnd = false
|
||||
client._stream.setKeepAlive(client.options.socketKeepalive)
|
||||
client._stream.setTimeout(0)
|
||||
|
||||
// TODO: Deprecate the connect event.
|
||||
client.emit('connect')
|
||||
client.initializeRetryVars()
|
||||
utils.setReconnectDefaults(client)
|
||||
|
||||
if (client.options.noReadyCheck) {
|
||||
readyHandler(client)
|
||||
|
Reference in New Issue
Block a user