Merge pull request #3889 from Jupeyy/pr_fix_queuehttps_refresh

Don't refresh, if a job is already running
This commit is contained in:
Dennis Felsing 2021-06-12 11:31:43 +02:00 committed by GitHub
commit ac584fa648
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)
@ -304,7 +306,8 @@ void CServerBrowserHttp::Refresh()
{
m_pChooseMaster->Refresh();
}
m_State = STATE_WANTREFRESH;
if(m_State == STATE_DONE)
m_State = STATE_WANTREFRESH;
Update();
}
bool ServerbrowserParseUrl(NETADDR *pOut, const char *pUrl)