Don't disconnect peers that report 'busy' during index transfer.

These peers are already being marked as not accepting remote index transmissions by yacyClient.transferIndex. That should by enough to prevent further transfer attempts until newer seed information is received.



git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2142 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
hermens 19 years ago
parent 899c1a5df5
commit b48327904a

@ -42,6 +42,7 @@
package de.anomic.plasma;
import java.lang.StringBuffer;
import de.anomic.server.logging.serverLog;
import de.anomic.yacy.yacyClient;
import de.anomic.yacy.yacyCore;
@ -147,8 +148,12 @@ public class plasmaDHTTransfer extends Thread {
if (this.isAborted()) return;
// we have lost the connection to the remote peer. Adding peer to disconnected list
this.log.logWarning("Index transfer to peer " + this.seed.getName() + ":" + this.seed.hash + " failed:'" + error + "', disconnecting peer");
yacyCore.peerActions.peerDeparture(this.seed);
StringBuffer failMessage = new StringBuffer("Index transfer to peer " + this.seed.getName() + ":" + this.seed.hash + " failed:'" + error + "'");
if (!error.equals("busy")) {
yacyCore.peerActions.peerDeparture(this.seed);
failMessage.append(", disconnected peer");
}
this.log.logWarning(failMessage.toString());
// if the retry counter limit was not exceeded we'll retry it in a few seconds
this.transferStatusMessage = "Disconnected peer: " + ((retryCount > 5) ? error + ". Transfer aborted" : "Retry " + retryCount);

Loading…
Cancel
Save