File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -366,7 +366,8 @@ function handleInitialConnectEvent(self, event) {
366
366
self . s . logger . warn ( f ( message , _this . name ) ) ;
367
367
}
368
368
369
- // This is not a mongos proxy, remove it completely
369
+ // This is not a mongos proxy, destroy and remove it completely
370
+ _this . destroy ( true ) ;
370
371
removeProxyFrom ( self . connectingProxies , _this ) ;
371
372
// Emit the left event
372
373
self . emit ( 'left' , 'server' , _this ) ;
@@ -445,10 +446,9 @@ function connectProxies(self, servers) {
445
446
server . connect ( self . s . connectOptions ) ;
446
447
} , timeoutInterval ) ;
447
448
}
449
+
448
450
// Start all the servers
449
- while ( servers . length > 0 ) {
450
- connect ( servers . shift ( ) , timeoutInterval ++ ) ;
451
- }
451
+ servers . forEach ( server => connect ( server , timeoutInterval ++ ) ) ;
452
452
}
453
453
454
454
function pickProxy ( self , session ) {
You can’t perform that action at this time.
0 commit comments