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: minor refactoring
This commit is contained in:
@@ -51,16 +51,16 @@ function reconnect (client, why, error) {
|
||||
|
||||
client.emit('end')
|
||||
|
||||
if (why === 'timeout') {
|
||||
var message = 'Redis connection in broken state: connection timeout exceeded.'
|
||||
const err = new Errors.RedisError(message)
|
||||
// TODO: Find better error codes...
|
||||
err.code = 'CONNECTION_BROKEN'
|
||||
flushAndError(client, message, 'CONNECTION_BROKEN')
|
||||
client.emit('error', err)
|
||||
client.end(false)
|
||||
return
|
||||
}
|
||||
// if (why === 'timeout') {
|
||||
// var message = 'Redis connection in broken state: connection timeout exceeded.'
|
||||
// const err = new Errors.RedisError(message)
|
||||
// // TODO: Find better error codes...
|
||||
// err.code = 'CONNECTION_BROKEN'
|
||||
// flushAndError(client, message, 'CONNECTION_BROKEN')
|
||||
// client.emit('error', err)
|
||||
// client.end(false)
|
||||
// return
|
||||
// }
|
||||
|
||||
// If client is a requested shutdown, then don't retry
|
||||
if (client._closing) {
|
||||
|
Reference in New Issue
Block a user