You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2019/02/12 18:30:08 UTC

[tinkerpop] branch master updated: Changed loop break check to break out of the connection creation loop if greater than or equal to the expected amount of connections are created

This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/master by this push:
     new 03f9274  Changed loop break check to break out of the connection creation loop if greater than or equal to the expected amount of connections are created
     new 54912dd  Merge pull request #1057 from IsaacBoy/TINKERPOP-2155
03f9274 is described below

commit 03f9274acf1d75d2c05e1b415fe5f997d6764778
Author: Isaac Insley <Is...@blackbaud.me>
AuthorDate: Thu Feb 7 09:31:28 2019 -0500

    Changed loop break check to break out of the connection creation loop if greater than or equal to the expected amount of connections are created
---
 gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs
index 4ea57e4..8557d01 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs
@@ -70,7 +70,7 @@ namespace Gremlin.Net.Driver
             while (true)
             {
                 var nrOpened = Interlocked.CompareExchange(ref _nrConnections, PoolEmpty, PoolEmpty);
-                if (nrOpened == _poolSize) break;
+                if (nrOpened >= _poolSize) break;
                 if (nrOpened != PoolPopulationInProgress)
                 {
                     await PopulatePoolAsync().ConfigureAwait(false);
@@ -81,7 +81,7 @@ namespace Gremlin.Net.Driver
         private async Task PopulatePoolAsync()
         {
             var nrOpened = Interlocked.CompareExchange(ref _nrConnections, PoolPopulationInProgress, PoolEmpty);
-            if (nrOpened == PoolPopulationInProgress || nrOpened == _poolSize) return;
+            if (nrOpened == PoolPopulationInProgress || nrOpened >= _poolSize) return;
 
             try
             {