File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 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) {
228228RedisClient . prototype . create_stream = function ( ) {
229229 var self = this ;
230230
231- var first_attempt = ! this . stream ;
232-
233231 // Init parser
234232 this . reply_parser = create_parser ( this ) ;
235233
@@ -308,8 +306,7 @@ RedisClient.prototype.create_stream = function () {
308306 this . ready = true ;
309307 // Fail silently as we might not be able to connect
310308 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' ) {
313310 self . emit ( 'error' , err ) ;
314311 }
315312 } ) ;
Original file line number Diff line number Diff line change @@ -260,10 +260,9 @@ describe('client authentication', function () {
260260 password : 'wrong_password' ,
261261 parser : parser
262262 } ) ;
263- client . on ( 'error' , function ( err ) {
263+ client . once ( 'error' , function ( err ) {
264264 assert . strictEqual ( err . message , 'ERR invalid password' ) ;
265- // Make sure no other errors are reported
266- setTimeout ( done , 50 ) ;
265+ done ( ) ;
267266 } ) ;
268267 } ) ;
269268
You can’t perform that action at this time.
0 commit comments