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

florianhockmann pushed a commit to branch TINKERPOP-2559
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 37690221cbbe805618732c98109863c00ecf4160
Author: Florian Hockmann <[email protected]>
AuthorDate: Fri Apr 30 15:32:06 2021 +0200

    TINKERPOP-2559 Stop sending session close message
    
    The server already stopped reacting to it in 3.5.0.
---
 gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs | 14 +-------------
 gremlin-dotnet/src/Gremlin.Net/Driver/Tokens.cs     |  1 +
 2 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs 
b/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs
index 491a62a..1e91e3c 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs
@@ -267,22 +267,10 @@ namespace Gremlin.Net.Driver
         public async Task CloseAsync()
         {
             Interlocked.Exchange(ref _connectionState, Closed);
-
-            if (_sessionEnabled)
-            {
-                await CloseSession().ConfigureAwait(false);
-            }
+            
             await _webSocketConnection.CloseAsync().ConfigureAwait(false);
         }
 
-        private async Task CloseSession()
-        {
-            // build a request to close this session
-            var msg = 
RequestMessage.Build(Tokens.OpsClose).Processor(Tokens.ProcessorSession).Create();
-
-            await SendMessageAsync(msg).ConfigureAwait(false);
-        }
-
         #region IDisposable Support
 
         private bool _disposed;
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/Tokens.cs 
b/gremlin-dotnet/src/Gremlin.Net/Driver/Tokens.cs
index f35b128..f437d3c 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/Tokens.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/Tokens.cs
@@ -54,6 +54,7 @@ namespace Gremlin.Net.Driver
         /// <summary>
         ///     Operation used to get all the keys of all side-effects as 
produced by a previously executed Traversal.
         /// </summary>
+        [Obsolete("The close message was removed from servers in 3.5.0 so it 
has no value any more.")]
         public static string OpsClose = "close";
 
         /// <summary>

Reply via email to