mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-20 06:58:20 +00:00
skip communication with the version server in case the client can't resolve the address
This commit is contained in:
parent
9800dd4172
commit
eaab561b5b
|
@ -1670,6 +1670,8 @@ void CClient::VersionUpdate()
|
||||||
else if(m_VersionInfo.m_State == CVersionInfo::STATE_START)
|
else if(m_VersionInfo.m_State == CVersionInfo::STATE_START)
|
||||||
{
|
{
|
||||||
if(m_VersionInfo.m_VersionServeraddr.m_Job.Status() == CJob::STATE_DONE)
|
if(m_VersionInfo.m_VersionServeraddr.m_Job.Status() == CJob::STATE_DONE)
|
||||||
|
{
|
||||||
|
if(m_VersionInfo.m_VersionServeraddr.m_Job.Result() == 0)
|
||||||
{
|
{
|
||||||
CNetChunk Packet;
|
CNetChunk Packet;
|
||||||
|
|
||||||
|
@ -1686,6 +1688,9 @@ void CClient::VersionUpdate()
|
||||||
m_ContactClient.Send(&Packet);
|
m_ContactClient.Send(&Packet);
|
||||||
m_VersionInfo.m_State = CVersionInfo::STATE_READY;
|
m_VersionInfo.m_State = CVersionInfo::STATE_READY;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
m_VersionInfo.m_State = CVersionInfo::STATE_ERROR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -174,6 +174,7 @@ class CClient : public IClient, public CDemoPlayer::IListner
|
||||||
STATE_INIT=0,
|
STATE_INIT=0,
|
||||||
STATE_START,
|
STATE_START,
|
||||||
STATE_READY,
|
STATE_READY,
|
||||||
|
STATE_ERROR,
|
||||||
};
|
};
|
||||||
|
|
||||||
int m_State;
|
int m_State;
|
||||||
|
|
Loading…
Reference in a new issue