From: James Turner Date: Sun, 7 Jun 2015 13:53:44 +0000 (+0200) Subject: Fix SVN server fallback when query fails X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a9742fba7c236016f916debc0ccc0c285a06bc79;p=simgear.git Fix SVN server fallback when query fails --- diff --git a/simgear/scene/tsync/terrasync.cxx b/simgear/scene/tsync/terrasync.cxx index 7ebb3f34..c0b5b82c 100644 --- a/simgear/scene/tsync/terrasync.cxx +++ b/simgear/scene/tsync/terrasync.cxx @@ -513,8 +513,12 @@ void SGTerraSync::SvnThread::run() _http.update(20); } - _svn_server = ssq->svnUrl(); - SG_LOG(SG_TERRAIN,SG_INFO, "Closest TerraSync server:" << _svn_server); + if (req->readyState() == HTTP::Request::DONE) { + _svn_server = ssq->svnUrl(); + SG_LOG(SG_TERRAIN,SG_INFO, "Closest TerraSync server:" << _svn_server); + } else { + SG_LOG(SG_TERRAIN,SG_WARN, "Failed to query closest TerraSync server"); + } } else { SG_LOG(SG_TERRAIN,SG_INFO, "Explicit: TerraSync server:" << _svn_server); }