mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Add timeout for serverbrowser http request
This commit is contained in:
parent
90303692df
commit
c60715e907
|
@ -272,7 +272,9 @@ void CServerBrowserHttp::Update()
|
|||
}
|
||||
return;
|
||||
}
|
||||
m_pEngine->AddJob(m_pGetServers = std::make_shared<CGet>(pBestUrl, CTimeout{0, 0, 0}));
|
||||
// 10 seconds connection timeout, lower than 8KB/s for 10 seconds to fail.
|
||||
CTimeout Timeout{10000, 8000, 10};
|
||||
m_pEngine->AddJob(m_pGetServers = std::make_shared<CGet>(pBestUrl, Timeout));
|
||||
m_State = STATE_REFRESHING;
|
||||
}
|
||||
else if(m_State == STATE_REFRESHING)
|
||||
|
|
Loading…
Reference in a new issue