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 2018/09/21 19:38:40 UTC

[1/3] tinkerpop git commit: Make closing of connections robust TINKERPOP-2026

Repository: tinkerpop
Updated Branches:
  refs/heads/tp32 af73f45ad -> 0426797a5


Make closing of connections robust TINKERPOP-2026


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/4965803a
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/4965803a
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/4965803a

Branch: refs/heads/tp32
Commit: 4965803ae8e9283817e0171e1c463014c9166970
Parents: 3afc576
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Sat Sep 1 17:02:23 2018 +0200
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Sat Sep 1 17:02:23 2018 +0200

----------------------------------------------------------------------
 .../Gremlin.Net/Driver/WebSocketConnection.cs    | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4965803a/gremlin-dotnet/src/Gremlin.Net/Driver/WebSocketConnection.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/WebSocketConnection.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/WebSocketConnection.cs
index 9672606..b5a4cc8 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/WebSocketConnection.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/WebSocketConnection.cs
@@ -43,11 +43,24 @@ namespace Gremlin.Net.Driver
 
         public async Task CloseAsync()
         {
-            await
-                _client.CloseAsync(WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None)
-                    .ConfigureAwait(false);
+            if (CloseAlreadyInitiated) return;
+
+            try
+            {
+                await
+                    _client.CloseAsync(WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None)
+                        .ConfigureAwait(false);
+            }
+            catch (Exception)
+            {
+                // Swallow exceptions silently as there is nothing to do when closing fails
+            }
         }
 
+        private bool CloseAlreadyInitiated => _client.State == WebSocketState.Closed ||
+                                            _client.State == WebSocketState.Aborted ||
+                                            _client.State == WebSocketState.CloseSent;
+
         public async Task SendMessageAsync(byte[] message)
         {
             await


[2/3] tinkerpop git commit: Merge remote-tracking branch 'origin/TINKERPOP-2026' into tp32

Posted by sp...@apache.org.
Merge remote-tracking branch 'origin/TINKERPOP-2026' into tp32


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/4bdf0d21
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/4bdf0d21
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/4bdf0d21

Branch: refs/heads/tp32
Commit: 4bdf0d212af4eba5f841ce27e751dfd9f1b8a9bc
Parents: af73f45 4965803
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Sep 21 15:12:29 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Sep 21 15:12:29 2018 -0400

----------------------------------------------------------------------
 .../Gremlin.Net/Driver/WebSocketConnection.cs    | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------



[3/3] tinkerpop git commit: Updated changelog CTR

Posted by sp...@apache.org.
Updated changelog CTR


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/0426797a
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/0426797a
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/0426797a

Branch: refs/heads/tp32
Commit: 0426797a5a3da5b05a35cbbf075dc4100d5d5412
Parents: 4bdf0d2
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Sep 21 15:15:50 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Sep 21 15:15:50 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0426797a/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 948f8df..c1e8b56 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -46,6 +46,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Fixed bug in `branch()` where reducing steps as options would produce incorrect results.
 * Removed recursive handling of streaming results from Gremlin-Python driver to avoid max recursion depth errors.
 * Improved performance of `TraversalVertexProgram` and related infrastructure.
+* Checked web socket state before closing connection in the .NET driver.
 * Deprecated `BulkLoaderVertexProgram` and related infrastructure.
 * Deprecated `BulkDumperVertexProgram` with the more aptly named `CloneVertexProgram`.
 * Added `createGratefulDead()` to `TinkerFactory` to help make it easier to try to instantiate that toy graph.