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

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

commit 37914a46c4e877fe9bcb1d7131ca25a4b1d0a8ed
Author: Ken Hu <[email protected]>
AuthorDate: Mon Jul 6 20:09:19 2026 -0700

    Change exception to IOException during connection closure in Java CTR.
    
    The idiomatic exception for network errors is IOException not
    RuntimeException. This was also causing a flaky test failure for
    shouldHandleServerClosingConnectionBeforeResponse()
---
 .../tinkerpop/gremlin/driver/handler/InactiveChannelHandler.java       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/InactiveChannelHandler.java
 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/InactiveChannelHandler.java
index 5d42794dbd..ebf608dcb3 100644
--- 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/InactiveChannelHandler.java
+++ 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/InactiveChannelHandler.java
@@ -22,6 +22,7 @@ import io.netty.channel.ChannelHandler;
 import io.netty.channel.ChannelHandlerContext;
 import io.netty.channel.ChannelInboundHandlerAdapter;
 import io.netty.util.AttributeKey;
+import java.io.IOException;
 
 /**
  * Handler used to detect if the channel has become inactive and throw an 
error in certain scenarios.
@@ -47,7 +48,7 @@ public class InactiveChannelHandler extends 
ChannelInboundHandlerAdapter {
                 errMsg = "Connection to server closed unexpectedly. Ensure 
that the server is still" +
                         " reachable. The server may be expecting SSL to be 
enabled.";
             }
-            ctx.fireExceptionCaught(new RuntimeException(errMsg));
+            ctx.fireExceptionCaught(new IOException(errMsg));
         } else {
             super.channelInactive(ctx);
         }

Reply via email to