You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by mp...@apache.org on 2023/06/14 13:12:21 UTC

[ignite] branch master updated: IGNITE-19715 Thin client socket#open timeout changed to ClientConfiguration#timeout property. (#10770)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new e7c9fe7eb1e IGNITE-19715 Thin client socket#open timeout changed to ClientConfiguration#timeout property. (#10770)
e7c9fe7eb1e is described below

commit e7c9fe7eb1e52c149b1ab224737aff3ac1cb7ed8
Author: Mikhail Petrov <32...@users.noreply.github.com>
AuthorDate: Wed Jun 14 16:12:10 2023 +0300

    IGNITE-19715 Thin client socket#open timeout changed to ClientConfiguration#timeout property. (#10770)
---
 .../thin/io/gridnioserver/GridNioClientConnectionMultiplexer.java  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/thin/io/gridnioserver/GridNioClientConnectionMultiplexer.java b/modules/core/src/main/java/org/apache/ignite/internal/client/thin/io/gridnioserver/GridNioClientConnectionMultiplexer.java
index 7cf78735cf2..8951e0f4bcc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/thin/io/gridnioserver/GridNioClientConnectionMultiplexer.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/thin/io/gridnioserver/GridNioClientConnectionMultiplexer.java
@@ -64,6 +64,9 @@ public class GridNioClientConnectionMultiplexer implements ClientConnectionMulti
     /** */
     private final ReadWriteLock rwLock = new ReentrantReadWriteLock();
 
+    /** */
+    private final int connTimeout;
+
     /**
      * Constructor.
      *
@@ -86,6 +89,8 @@ public class GridNioClientConnectionMultiplexer implements ClientConnectionMulti
         else
             filters = new GridNioFilter[] {codecFilter};
 
+        connTimeout = cfg.getTimeout();
+
         try {
             srv = GridNioServer.<ByteBuffer>builder()
                     .port(CLIENT_MODE_PORT)
@@ -142,7 +147,7 @@ public class GridNioClientConnectionMultiplexer implements ClientConnectionMulti
 
         try {
             SocketChannel ch = SocketChannel.open();
-            ch.socket().connect(new InetSocketAddress(addr.getHostName(), addr.getPort()), Integer.MAX_VALUE);
+            ch.socket().connect(new InetSocketAddress(addr.getHostName(), addr.getPort()), connTimeout);
 
             Map<Integer, Object> meta = new HashMap<>();
             GridNioFuture<?> sslHandshakeFut = null;