shishkovilja commented on code in PR #12572:
URL: https://github.com/apache/ignite/pull/12572#discussion_r2643422862


##########
modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java:
##########
@@ -739,13 +739,18 @@ private static void sleepEx(long millis, Runnable before, 
Runnable after) throws
 
                 TcpDiscoveryHandshakeResponse res = spi.readMessage(ses, 
ackTimeout0);
 
-                if (res.redirectAddresses() != null) {
+                // Convert the addresses once.
+                Collection<InetSocketAddress> redirectAddrs = 
res.redirectAddresses();
+
+                if (redirectAddrs != null) {
                     U.closeQuiet(sock);
 
                     if (log.isInfoEnabled())
-                        log.info("Reconnecting to the addresses of a proper DC 
[addrs=" + res.redirectAddresses() + ']');
+                        log.info("Reconnecting to the addresses of a proper DC 
[addrs=" + redirectAddrs + ']');
+
+                    T2<Boolean, T2<SocketStream, Integer>> redirectedRes = 
sendJoinRequests(recon, redirectAddrs);
 
-                    T2<Boolean, T2<SocketStream, Integer>> redirectedRes = 
sendJoinRequests(recon, res.redirectAddresses());
+                    //redirectAddrs.clear();

Review Comment:
   To remove



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to