From 77ee9bdd30a9e213b8e4b77e3de9614dbf23e467 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Fri, 11 Oct 2024 17:05:09 -0700 Subject: [PATCH] [ntcore] Client: only connect to IPv4 addresses (#7195) The server only binds to IPv6, so connection attempts to that are useless. --- ntcore/src/main/native/cpp/NetworkClient.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ntcore/src/main/native/cpp/NetworkClient.cpp b/ntcore/src/main/native/cpp/NetworkClient.cpp index da04dcac85..c39d7d1dda 100644 --- a/ntcore/src/main/native/cpp/NetworkClient.cpp +++ b/ntcore/src/main/native/cpp/NetworkClient.cpp @@ -149,7 +149,7 @@ NetworkClient3::NetworkClient3(int inst, std::string_view id, m_loopRunner.ExecAsync([this](uv::Loop& loop) { m_parallelConnect = wpi::ParallelTcpConnector::Create( loop, kReconnectRate, m_logger, - [this](uv::Tcp& tcp) { TcpConnected(tcp); }); + [this](uv::Tcp& tcp) { TcpConnected(tcp); }, true); m_sendOutgoingTimer = uv::Timer::Create(loop); if (m_sendOutgoingTimer) { @@ -307,7 +307,7 @@ NetworkClient::NetworkClient( m_loopRunner.ExecAsync([this](uv::Loop& loop) { m_parallelConnect = wpi::ParallelTcpConnector::Create( loop, kReconnectRate, m_logger, - [this](uv::Tcp& tcp) { TcpConnected(tcp); }); + [this](uv::Tcp& tcp) { TcpConnected(tcp); }, true); m_readLocalTimer = uv::Timer::Create(loop); if (m_readLocalTimer) {