Add additional logging in servers list getting from HttpRequest.

This commit is contained in:
vng 2012-09-26 14:11:20 +03:00 committed by Alex Zolotarev
parent fd713b63b8
commit 8653a716cc
2 changed files with 10 additions and 1 deletions

View file

@ -69,7 +69,14 @@ class MemoryHttpRequest : public HttpRequest, public IHttpThreadCallback
virtual void OnFinish(long httpCode, int64_t, int64_t)
{
m_status = (httpCode == 200) ? ECompleted : EFailed;
if (httpCode == 200)
m_status = ECompleted;
else
{
LOG(LWARNING, ("HttpRequest error:", httpCode));
m_status = EFailed;
}
m_onFinish(*this);
}

View file

@ -44,6 +44,8 @@ void GetServerListFromRequest(HttpRequest const & request, vector<string> & urls
}
else
{
LOG(LWARNING, ("Can't get servers list from request"));
string serverList;
if (!Settings::Get(SETTINGS_SERVERS_KEY, serverList))
serverList = GetPlatform().DefaultUrlsJSON();