Author: orbiter
Date: 2008-03-12 01:56:18 +0100 (Wed, 12 Mar 2008)
New Revision: 4555

Modified:
   trunk/source/de/anomic/yacy/yacyClient.java
Log:
preventing that peer which return a false search result are disconnected

Modified: trunk/source/de/anomic/yacy/yacyClient.java
===================================================================
--- trunk/source/de/anomic/yacy/yacyClient.java 2008-03-12 00:24:20 UTC (rev 
4554)
+++ trunk/source/de/anomic/yacy/yacyClient.java 2008-03-12 00:56:18 UTC (rev 
4555)
@@ -443,8 +443,8 @@
                     ), "UTF-8"
                );
         } catch (IOException e) {
-            yacyCore.log.logFine("SEARCH failed FROM " + target.hash + ":" + 
target.getName() + " (" + e.getMessage() + "), score=" + target.selectscore + 
", DHTdist=" + yacyDHTAction.dhtDistance(target.hash, wordhashes.substring(0, 
12)));
-            yacyCore.peerActions.peerDeparture(target, "search request to peer 
created io exception: " + e.getMessage());
+            yacyCore.log.logInfo("SEARCH failed, Peer: " + target.hash + ":" + 
target.getName() + " (" + e.getMessage() + "), score=" + target.selectscore + 
", DHTdist=" + yacyDHTAction.dhtDistance(target.hash, wordhashes.substring(0, 
12)));
+            //yacyCore.peerActions.peerDeparture(target, "search request to 
peer created io exception: " + e.getMessage());
             return null;
         }
 
@@ -484,8 +484,8 @@
             results = Integer.parseInt(result.get("count"));
             joincount = Integer.parseInt(result.get("joincount"));
         } catch (NumberFormatException e) {
-            yacyCore.log.logFine("SEARCH failed FROM " + target.hash + ":" + 
target.getName() + ", wrong output format");
-            yacyCore.peerActions.peerDeparture(target, "search request to peer 
created number format exception");
+            yacyCore.log.logInfo("SEARCH failed FROM " + target.hash + ":" + 
target.getName() + ", wrong output format: " + e.getMessage());
+            //yacyCore.peerActions.peerDeparture(target, "search request to 
peer created number format exception");
             return null;
         }
                // System.out.println("***result count " + results);

_______________________________________________
YaCy-svn mailing list
YaCy-svn@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/yacy-svn

Antwort per Email an