You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ace.apache.org by ma...@apache.org on 2011/10/25 08:29:09 UTC

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

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));