From f9f5d3ebb17dc43b612a7fafa6285186a0ce675c Mon Sep 17 00:00:00 2001 From: Benau Date: Sun, 29 Mar 2020 11:41:11 +0800 Subject: [PATCH] Fix broken IPv4 direct connection after LAN server creation --- src/network/protocols/connect_to_server.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/network/protocols/connect_to_server.cpp b/src/network/protocols/connect_to_server.cpp index de92bcc89..33ce4a074 100644 --- a/src/network/protocols/connect_to_server.cpp +++ b/src/network/protocols/connect_to_server.cpp @@ -106,8 +106,15 @@ void ConnectToServer::setup() if (NetworkConfig::get()->isLAN()) { m_state = GOT_SERVER_ADDRESS; - if (m_server->useIPV6Connection()) - setIPv6Socket(1); + // For graphical client server the IPv6 socket is handled by server + // process + if (!STKHost::get()->isClientServer()) + { + if (m_server->useIPV6Connection()) + setIPv6Socket(1); + else + setIPv6Socket(0); + } } else m_state = SET_PUBLIC_ADDRESS;