incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r939308 - /incubator/lcf/trunk/modules/connectors/rss/connector/org/apache/lcf/crawler/connectors/rss/ThrottledFetcher.java
Date Thu, 29 Apr 2010 13:53:05 GMT
Author: kwright
Date: Thu Apr 29 13:53:05 2010
New Revision: 939308

URL: http://svn.apache.org/viewvc?rev=939308&view=rev
Log:
Fix for CONNECTORS-28.  Catch the specific situation that was being treated incorrectly. 
This is a narrow fix, so there may be other cases where a similar trap is called for.

Modified:
    incubator/lcf/trunk/modules/connectors/rss/connector/org/apache/lcf/crawler/connectors/rss/ThrottledFetcher.java

Modified: incubator/lcf/trunk/modules/connectors/rss/connector/org/apache/lcf/crawler/connectors/rss/ThrottledFetcher.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/rss/connector/org/apache/lcf/crawler/connectors/rss/ThrottledFetcher.java?rev=939308&r1=939307&r2=939308&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/connectors/rss/connector/org/apache/lcf/crawler/connectors/rss/ThrottledFetcher.java
(original)
+++ incubator/lcf/trunk/modules/connectors/rss/connector/org/apache/lcf/crawler/connectors/rss/ThrottledFetcher.java
Thu Apr 29 13:53:05 2010
@@ -712,6 +712,15 @@ public class ThrottledFetcher
           throw new ServiceInterruption("Timed out waiting for a connection for '"+myUrl+"'",
e, currentTime + 1000000L,
             currentTime + 720L * 60000L,-1,false);
         }
+        catch (java.net.NoRouteToHostException e)
+        {
+          // This exception means we know the IP address but can't get there.  That's either
a firewall issue, or it's something transient
+          // with the network.  Some degree of retry is probably wise.
+          throwable = e;
+          long currentTime = System.currentTimeMillis();
+          throw new ServiceInterruption("No route to host for '"+myUrl+"'", e, currentTime
+ 1000000L,
+            currentTime + 720L * 60000L,-1,false);
+        }
         catch (IOException e)
         {
           // Treat this as a bad url.  We don't know what happened, but it isn't something
we are going to naively



Mime
View raw message