]> git.mxchange.org Git - simgear.git/commitdiff
Fix SVN server fallback when query fails
authorJames Turner <zakalawe@mac.com>
Sun, 7 Jun 2015 13:53:44 +0000 (15:53 +0200)
committerJames Turner <zakalawe@mac.com>
Sun, 7 Jun 2015 13:53:44 +0000 (15:53 +0200)
simgear/scene/tsync/terrasync.cxx

index 7ebb3f341f697a97d9b2670224e86c66a6a12009..c0b5b82c8825b656205972958a32dd7273656ebd 100644 (file)
@@ -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);
         }