Fix broken IPv4 direct connection after LAN server creation

This commit is contained in:
Benau 2020-03-29 11:41:11 +08:00
parent 76c78b82d8
commit f9f5d3ebb1

View File

@ -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;