FlorianHockmann commented on a change in pull request #1263: dotnet: add 
session mode connection
URL: https://github.com/apache/tinkerpop/pull/1263#discussion_r401584750
 
 

 ##########
 File path: gremlin-dotnet/src/Gremlin.Net/Driver/GremlinClient.cs
 ##########
 @@ -69,6 +69,21 @@ public class GremlinClient : IGremlinClient
             var writer = graphSONWriter ?? new GraphSON3Writer();
             var connectionFactory = new ConnectionFactory(gremlinServer, 
reader, writer, mimeType ?? DefaultMimeType,
                 webSocketConfiguration, sessionId);
+
+            // make sure one connection in pool as session mode
+            if (!String.IsNullOrEmpty(sessionId))
+            {
+                if (connectionPoolSettings != null)
+                {
+                    if (connectionPoolSettings.PoolSize != 1)
+                        throw new 
ArgumentOutOfRangeException(nameof(connectionPoolSettings), "Session Client 
PoolSize must be 1!");
 
 Review comment:
   I am not sure whether every user will understand what `Session Client` means 
as we don't use that term any where else I think. Could you maybe reword it to 
something like: _Only a pool size of 1 is supported in session mode._?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to