throw exception when host cache returns 0.0.0.0 for any host (trying to track down a strange problem)

This commit is contained in:
Noah Levitt
2013-11-15 17:20:55 -08:00
parent e2f4b7287f
commit df2a313797
@@ -107,6 +107,9 @@ public class DefaultServerCache extends ServerCache implements Closeable, Serial
String hkey = new String(hostname); // ensure private minimal key
return new CrawlHost(hkey);
}});
if ("0.0.0.0".equals(host.getIP().getHostAddress())) {
throw new IllegalStateException("got suspicious value 0.0.0.0 for " + hostname);
}
return host;
}