File tree 2 files changed +3
-7
lines changed
2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -228,8 +228,6 @@ function create_parser (self) {
228
228
RedisClient . prototype . create_stream = function ( ) {
229
229
var self = this ;
230
230
231
- var first_attempt = ! this . stream ;
232
-
233
231
// Init parser
234
232
this . reply_parser = create_parser ( this ) ;
235
233
@@ -308,8 +306,7 @@ RedisClient.prototype.create_stream = function () {
308
306
this . ready = true ;
309
307
// Fail silently as we might not be able to connect
310
308
this . auth ( this . auth_pass , function ( err ) {
311
- if ( err && first_attempt ) {
312
- self . command_queue . get ( 0 ) . callback = noop ;
309
+ if ( err && err . code !== 'UNCERTAIN_STATE' ) {
313
310
self . emit ( 'error' , err ) ;
314
311
}
315
312
} ) ;
Original file line number Diff line number Diff line change @@ -260,10 +260,9 @@ describe('client authentication', function () {
260
260
password : 'wrong_password' ,
261
261
parser : parser
262
262
} ) ;
263
- client . on ( 'error' , function ( err ) {
263
+ client . once ( 'error' , function ( err ) {
264
264
assert . strictEqual ( err . message , 'ERR invalid password' ) ;
265
- // Make sure no other errors are reported
266
- setTimeout ( done , 50 ) ;
265
+ done ( ) ;
267
266
} ) ;
268
267
} ) ;
269
268
You can’t perform that action at this time.
0 commit comments