mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
refactor: Directly use shared URL from global setup
Previous we relyed on the watchdog providing a working shared URL (or empty URL if no URL was reachable). This creates some overhead and might not work in all cases because of the time between the call to getWorkingSharedUrl() and the actual network request. Further, not all calls that are fetching data from our servers were using the shared URL from the watchdog anyway. Lastly, this careful checking if the URL is available is only done for the shared URL and not for all the other URLs that are queried by swift.
This commit is contained in:
@@ -723,17 +723,6 @@ namespace BlackCore
|
||||
return m_networkWatchDog && m_networkWatchDog->isSwiftDbAccessible();
|
||||
}
|
||||
|
||||
bool CApplication::hasWorkingSharedUrl() const
|
||||
{
|
||||
return m_networkWatchDog && m_networkWatchDog->hasWorkingSharedUrl();
|
||||
}
|
||||
|
||||
CUrl CApplication::getWorkingSharedUrl() const
|
||||
{
|
||||
if (!m_networkWatchDog || !this->isNetworkAccessible()) { return CUrl(); }
|
||||
return m_networkWatchDog->getWorkingSharedUrl();
|
||||
}
|
||||
|
||||
void CApplication::exit(int retcode)
|
||||
{
|
||||
if (sApp) { instance()->gracefulShutdown(); }
|
||||
|
||||
Reference in New Issue
Block a user