Fix terrasync behaviour when net is down.
This commit is contained in:
parent
6e5cbd7fc5
commit
87590cafb2
@ -1239,7 +1239,7 @@ HTTPRepository::failure() const
|
||||
|
||||
void HTTPRepoPrivate::failedToGetRootIndex(HTTPRepository::ResultCode st)
|
||||
{
|
||||
SG_LOG(SG_TERRASYNC, SG_WARN, "Failed to get root of repo:" << baseUrl);
|
||||
SG_LOG(SG_TERRASYNC, SG_WARN, "Failed to get root of repo:" << baseUrl << " " << st);
|
||||
status = st;
|
||||
}
|
||||
|
||||
@ -1288,7 +1288,6 @@ HTTPRepository::failure() const
|
||||
|
||||
// maybe there was nothing to do
|
||||
if (activeRequests.empty()) {
|
||||
status = HTTPRepository::REPO_NO_ERROR;
|
||||
isUpdating = false;
|
||||
}
|
||||
}
|
||||
|
@ -496,6 +496,13 @@ void SGTerraSync::WorkerThread::run()
|
||||
}
|
||||
}
|
||||
|
||||
if (_httpServer.empty()) {
|
||||
SG_LOG(SG_TERRASYNC, SG_ALERT, "ERROR: no http-server found, terrasync will be disabled");
|
||||
SGGuard<SGMutex> g(_stateLock);
|
||||
_running = false;
|
||||
return;
|
||||
}
|
||||
|
||||
runInternal();
|
||||
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user