File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -464,18 +464,18 @@ RedisMetaClient.prototype.createMasterClient = function(options) {
464
464
options = options || { } ;
465
465
options . allowNoSocket = true ;
466
466
var client = RedisSingleClient . createClient ( this . master . port , this . master . host , options ) ;
467
- var id = ++ this . masterClientId ;
468
467
var self = this ;
468
+ var connection_id = client . connection_id ;
469
469
client . on ( 'error' , function ( ) { } ) ;
470
470
client . on ( 'end' , function ( ) {
471
471
for ( var i = 0 , len = self . masterClients . length ; i < len ; i ++ ) {
472
472
var cl = self . masterClients [ i ] ;
473
- if ( cl . client . closing === true && id === cl . id ) {
473
+ if ( cl . client . closing === true && connection_id === cl . client . connection_id ) {
474
474
self . masterClients = self . masterClients . slice ( i , 1 ) ;
475
475
}
476
476
}
477
477
} ) ;
478
- this . masterClients . push ( { config : this . master , client : client , id : id } ) ;
478
+ this . masterClients . push ( { config : this . master , client : client } ) ;
479
479
return client ;
480
480
} ;
481
481
You can’t perform that action at this time.
0 commit comments