File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -904,13 +904,13 @@ function processWaitQueue(topology: Topology) {
904904 } else if ( selectedDescriptions . length === 1 ) {
905905 selectedServer = topology . s . servers . get ( selectedDescriptions [ 0 ] . address ) ;
906906 } else if ( selectedDescriptions . length === 2 ) {
907- // If there are only two servers, we avoid shuffling the array of
908- // server descriptions
909907 const server1 = topology . s . servers . get ( selectedDescriptions [ 0 ] . address ) ;
910908 const server2 = topology . s . servers . get ( selectedDescriptions [ 1 ] . address ) ;
911909
912910 if ( server1 && server2 ) {
913911 if ( server1 . s . operationCount === server2 . s . operationCount ) {
912+ // If there are only two servers, we avoid shuffling the array of
913+ // server descriptions
914914 selectedServer = Math . floor ( Math . random ( ) * 2 ) === 0 ? server1 : server2 ;
915915 } else {
916916 selectedServer = server1 . s . operationCount < server2 . s . operationCount ? server1 : server2 ;
You can’t perform that action at this time.
0 commit comments