Skip to content

Commit

Permalink
more control for seed receive
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2709 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Oct 4, 2006
1 parent 1c0e65f commit 1dfab1a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion source/de/anomic/yacy/yacyPeerActions.java
Expand Up @@ -48,6 +48,7 @@
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
Expand Down Expand Up @@ -378,7 +379,13 @@ final synchronized private boolean connectPeer(yacySeed seed, boolean direct) {
if (connectedSeed.getName() != seed.getName()) {
// TODO: update seed name lookup cache
}
} catch (java.text.ParseException e) {}
} catch (ParseException e) {
yacyCore.log.logFine("connect: rejecting wrong peer '" + seed.getName() + "' from " + seed.getAddress() + ". Cause: " + e.getMessage());
return false;
} catch (NumberFormatException e) {
yacyCore.log.logFine("connect: rejecting wrong peer '" + seed.getName() + "' from " + seed.getAddress() + ". Cause: " + e.getMessage());
return false;
}
yacyCore.log.logFine("connect: updated KNOWN " + ((direct) ? "direct " : "") + peerType + " peer '" + seed.getName() + "' from " + seed.getAddress());
seedDB.addConnected(seed);
return true;
Expand Down

0 comments on commit 1dfab1a

Please sign in to comment.