Add timeout for serverbrowser http request

This commit is contained in:
def 2021-06-09 15:24:43 +02:00 committed by Jupeyy
parent 90303692df
commit c60715e907

View file

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