mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge pull request #7587 from heinrich5991/pr_ddnet_fix_7575
Reintroduce `m_HaveGlobalTcpAddr`
This commit is contained in:
commit
f910ac6a1c
|
@ -2190,6 +2190,7 @@ void CClient::LoadDDNetInfo()
|
|||
NETADDR Addr;
|
||||
if(!net_addr_from_str(&Addr, ConnectingIp))
|
||||
{
|
||||
m_HaveGlobalTcpAddr = true;
|
||||
m_GlobalTcpAddr = Addr;
|
||||
log_debug("info", "got global tcp ip address: %s", (const char *)ConnectingIp);
|
||||
}
|
||||
|
@ -4651,7 +4652,7 @@ int CClient::UdpConnectivity(int NetType)
|
|||
break;
|
||||
case CONNECTIVITY::ADDRESS_KNOWN:
|
||||
GlobalUdpAddr.port = 0;
|
||||
if(NetType == (int)m_GlobalTcpAddr.type && net_addr_comp(&m_GlobalTcpAddr, &GlobalUdpAddr) != 0)
|
||||
if(m_HaveGlobalTcpAddr && NetType == (int)m_GlobalTcpAddr.type && net_addr_comp(&m_GlobalTcpAddr, &GlobalUdpAddr) != 0)
|
||||
{
|
||||
NewConnectivity = CONNECTIVITY_DIFFERING_UDP_TCP_IP_ADDRESSES;
|
||||
break;
|
||||
|
|
|
@ -90,6 +90,7 @@ class CClient : public IClient, public CDemoPlayer::IListener
|
|||
|
||||
CUuid m_ConnectionID = UUID_ZEROED;
|
||||
|
||||
bool m_HaveGlobalTcpAddr = false;
|
||||
NETADDR m_GlobalTcpAddr = NETADDR_ZEROED;
|
||||
|
||||
uint64_t m_aSnapshotParts[NUM_DUMMIES] = {0, 0};
|
||||
|
|
Loading…
Reference in a new issue