incubator-ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1188530 - /incubator/ace/trunk/ace-gateway-log/src/main/java/org/apache/ace/gateway/log/task/LogSyncTask.java
Date Tue, 25 Oct 2011 06:29:09 GMT
Author: marrs
Date: Tue Oct 25 06:29:09 2011
New Revision: 1188530

URL: http://svn.apache.org/viewvc?rev=1188530&view=rev
Log:
ACE-193 Sync task no longer tries to talk REST to a "file" URL, but does nothing instead.

Modified:
    incubator/ace/trunk/ace-gateway-log/src/main/java/org/apache/ace/gateway/log/task/LogSyncTask.java

Modified: incubator/ace/trunk/ace-gateway-log/src/main/java/org/apache/ace/gateway/log/task/LogSyncTask.java
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-gateway-log/src/main/java/org/apache/ace/gateway/log/task/LogSyncTask.java?rev=1188530&r1=1188529&r2=1188530&view=diff
==============================================================================
--- incubator/ace/trunk/ace-gateway-log/src/main/java/org/apache/ace/gateway/log/task/LogSyncTask.java
(original)
+++ incubator/ace/trunk/ace-gateway-log/src/main/java/org/apache/ace/gateway/log/task/LogSyncTask.java
Tue Oct 25 06:29:09 2011
@@ -61,7 +61,6 @@ public class LogSyncTask implements Runn
      * locally.
      */
     public void run() {
-        String gatewayID = m_identification.getID();
         URL host = m_discovery.discover();
 
         if (host == null) {
@@ -70,7 +69,13 @@ public class LogSyncTask implements Runn
             m_log.log(LogService.LOG_WARNING, "Unable to synchronize log with remote (endpoint="
+ m_endpoint + ") - none available");
             return;
         }
+        
+    	if ("file".equals(host.getProtocol())) {
+    		// if the discovery URL is a file, we cannot sync, so we silently return here
+    		return;
+    	}
 
+    	String gatewayID = m_identification.getID();
         Connection sendConnection = null;
         try {
             sendConnection = new Connection(new URL(host, m_endpoint + "/" + COMMAND_SEND));



Mime
View raw message