@@ -150,7 +150,7 @@ public async Task ReapAsync(IOBehavior ioBehavior, CancellationToken cancellatio
150
150
151
151
/// <summary>
152
152
/// Examines all the <see cref="ServerSession"/> objects in <see cref="m_leasedSessions"/> to determine if any
153
- /// have an owning <see cref="MySqlConnection"/> that has been garbage-collected. If so, assumes that the connection
153
+ /// have an owning <see cref="MySqlConnection"/> that has been garbage-collected. If so, assumes that the connection
154
154
/// was not properly disposed and returns the session to the pool.
155
155
/// </summary>
156
156
private void RecoverLeakedSessions ( )
@@ -344,7 +344,7 @@ private ConnectionPool(ConnectionSettings cs)
344
344
m_sessionSemaphore = new SemaphoreSlim ( cs . MaximumPoolSize ) ;
345
345
m_sessions = new LinkedList < ServerSession > ( ) ;
346
346
m_leasedSessions = new Dictionary < int , ServerSession > ( ) ;
347
- if ( cs . LoadBalance == MySqlLoadBalance . FewestConnections )
347
+ if ( cs . LoadBalance == MySqlLoadBalance . LeastConnections )
348
348
{
349
349
m_hostSessions = new Dictionary < string , int > ( ) ;
350
350
foreach ( var hostName in cs . HostNames )
@@ -353,7 +353,7 @@ private ConnectionPool(ConnectionSettings cs)
353
353
m_loadBalancer = cs . ConnectionType != ConnectionType . Tcp ? null :
354
354
cs . HostNames . Count == 1 || cs . LoadBalance == MySqlLoadBalance . InOrder ? InOrderLoadBalancer . Instance :
355
355
cs . LoadBalance == MySqlLoadBalance . Random ? RandomLoadBalancer . Instance :
356
- cs . LoadBalance == MySqlLoadBalance . FewestConnections ? new FewestConnectionsLoadBalancer ( this ) :
356
+ cs . LoadBalance == MySqlLoadBalance . LeastConnections ? new LeastConnectionsLoadBalancer ( this ) :
357
357
( ILoadBalancer ) new RoundRobinLoadBalancer ( ) ;
358
358
}
359
359
@@ -366,9 +366,9 @@ private void AdjustHostConnectionCount(ServerSession session, int delta)
366
366
}
367
367
}
368
368
369
- private sealed class FewestConnectionsLoadBalancer : ILoadBalancer
369
+ private sealed class LeastConnectionsLoadBalancer : ILoadBalancer
370
370
{
371
- public FewestConnectionsLoadBalancer ( ConnectionPool pool ) => m_pool = pool ;
371
+ public LeastConnectionsLoadBalancer ( ConnectionPool pool ) => m_pool = pool ;
372
372
373
373
public IEnumerable < string > LoadBalance ( IReadOnlyList < string > hosts )
374
374
{
0 commit comments