skip communication with the version server in case the client can't resolve the address

This commit is contained in:
oy 2018-10-31 18:21:39 +01:00
parent 9800dd4172
commit eaab561b5b
2 changed files with 16 additions and 10 deletions

View file

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

View file

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