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 d43dbca  Needed to send back a ack to the driver even though the close 
message is a no-op to the UnifiedHandler CTR
d43dbca is described below

commit d43dbca00b98a9a39a77091f6a418a8ac68647ba
Author: Stephen Mallette <[email protected]>
AuthorDate: Mon Dec 20 17:28:31 2021 -0500

    Needed to send back a ack to the driver even though the close message is a 
no-op to the UnifiedHandler CTR
---
 .../tinkerpop/gremlin/server/handler/UnifiedHandler.java       | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/UnifiedHandler.java
 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/UnifiedHandler.java
index 3ccae44..c23d7ed 100644
--- 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/UnifiedHandler.java
+++ 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/UnifiedHandler.java
@@ -136,8 +136,14 @@ public class UnifiedHandler extends 
SimpleChannelInboundHandler<RequestMessage>
                 return;
             }
 
-            // ignore the close session message from older versions of the 
protocol
-            if (msg.getOp().equals(Tokens.OPS_CLOSE)) return;
+            // this is for backward compatibility for drivers still sending a 
close message. the close message was
+            // removed in 3.5.0 but then added back for 3.5.2.
+            if (msg.getOp().equals(Tokens.OPS_CLOSE)) {
+                ctx.writeAndFlush(ResponseMessage.build(msg)
+                        .code(ResponseStatusCode.NO_CONTENT)
+                        .create());
+                return;
+            }
 
             final Optional<String> optMultiTaskSession = 
msg.optionalArgs(Tokens.ARGS_SESSION);
             final String sessionId = 
optMultiTaskSession.orElse(msg.getRequestId().toString());

Reply via email to