@@ -185,7 +185,7 @@ function auth_callback (self, pass, user, callback) {
185
185
if ( user instanceof Function ) {
186
186
callback = user ;
187
187
user = null ;
188
- }
188
+ }
189
189
return function ( err , res ) {
190
190
if ( err ) {
191
191
if ( no_password_is_set . test ( err . message ) ) {
@@ -208,21 +208,21 @@ function auth_callback (self, pass, user, callback) {
208
208
RedisClient . prototype . auth = RedisClient . prototype . AUTH = function auth ( pass , user , callback ) {
209
209
debug ( 'Sending auth to ' + this . address + ' id ' + this . connection_id ) ;
210
210
211
- // Backward compatibility support for auth with password only
212
- if ( user instanceof Function ) {
213
- callback = user ;
214
- user = null ;
215
- }
211
+ // Backward compatibility support for auth with password only
212
+ if ( user instanceof Function ) {
213
+ callback = user ;
214
+ user = null ;
215
+ }
216
216
// Stash auth for connect and reconnect.
217
217
this . auth_pass = pass ;
218
218
this . auth_user = user ;
219
219
var ready = this . ready ;
220
220
this . ready = ready || this . offline_queue . length === 0 ;
221
221
var tmp ;
222
- if ( user ) {
223
- tmp = this . internal_send_command ( new Command ( 'auth' , [ pass , user ] , auth_callback ( this , pass , user , callback ) ) ) ;
222
+ if ( user ) {
223
+ tmp = this . internal_send_command ( new Command ( 'auth' , [ pass , user ] , auth_callback ( this , pass , user , callback ) ) ) ;
224
224
} else {
225
- tmp = this . internal_send_command ( new Command ( 'auth' , [ pass ] , auth_callback ( this , pass , callback ) ) ) ;
225
+ tmp = this . internal_send_command ( new Command ( 'auth' , [ pass ] , auth_callback ( this , pass , callback ) ) ) ;
226
226
}
227
227
this . ready = ready ;
228
228
return tmp ;
@@ -232,18 +232,18 @@ RedisClient.prototype.auth = RedisClient.prototype.AUTH = function auth (pass, u
232
232
Multi . prototype . auth = Multi . prototype . AUTH = function auth ( pass , user , callback ) {
233
233
debug ( 'Sending auth to ' + this . address + ' id ' + this . connection_id ) ;
234
234
235
- // Backward compatibility support for auth with password only
236
- if ( user instanceof Function ) {
237
- callback = user ;
238
- user = null ;
239
- }
235
+ // Backward compatibility support for auth with password only
236
+ if ( user instanceof Function ) {
237
+ callback = user ;
238
+ user = null ;
239
+ }
240
240
// Stash auth for connect and reconnect.
241
241
this . auth_pass = pass ;
242
- this . auth_user = user ;
243
- if ( user ) {
244
- this . queue . push ( new Command ( 'auth' , [ pass , user ] , auth_callback ( this . _client , callback ) ) ) ;
242
+ this . auth_user = user ;
243
+ if ( user ) {
244
+ this . queue . push ( new Command ( 'auth' , [ pass , user ] , auth_callback ( this . _client , callback ) ) ) ;
245
245
} else {
246
- this . queue . push ( new Command ( 'auth' , [ pass ] , auth_callback ( this . _client , callback ) ) ) ;
246
+ this . queue . push ( new Command ( 'auth' , [ pass ] , auth_callback ( this . _client , callback ) ) ) ;
247
247
}
248
248
return this ;
249
249
} ;
0 commit comments