@ -316,8 +316,9 @@ public class yacyCore {
this . added = yacyClient . publishMySeed ( seed . getClusterAddress ( ) , seed . hash ) ;
this . added = yacyClient . publishMySeed ( seed . getClusterAddress ( ) , seed . hash ) ;
if ( this . added < 0 ) {
if ( this . added < 0 ) {
// no or wrong response, delete that address
// no or wrong response, delete that address
log . logInfo ( "publish: disconnected " + this . seed . get ( yacySeed . PEERTYPE , yacySeed . PEERTYPE_SENIOR ) + " peer '" + this . seed . getName ( ) + "' from " + this . seed . getPublicAddress ( ) ) ;
String cause = "peer ping to peer resulted in error response (added < 0)" ;
peerActions . peerDeparture ( this . seed ) ;
log . logInfo ( "publish: disconnected " + this . seed . get ( yacySeed . PEERTYPE , yacySeed . PEERTYPE_SENIOR ) + " peer '" + this . seed . getName ( ) + "' from " + this . seed . getPublicAddress ( ) + ": " + cause ) ;
peerActions . peerDeparture ( this . seed , cause ) ;
} else {
} else {
// success! we have published our peer to a senior peer
// success! we have published our peer to a senior peer
// update latest news from the other peer
// update latest news from the other peer
@ -442,9 +443,10 @@ public class yacyCore {
final String address = seed . getClusterAddress ( ) ;
final String address = seed . getClusterAddress ( ) ;
log . logFine ( "HELLO #" + i + " to peer '" + seed . get ( yacySeed . NAME , "" ) + "' at " + address ) ; // debug
log . logFine ( "HELLO #" + i + " to peer '" + seed . get ( yacySeed . NAME , "" ) + "' at " + address ) ; // debug
if ( ( address = = null ) | | ( seed . isProper ( ) ! = null ) ) {
String seederror = seed . isProper ( ) ;
if ( ( address = = null ) | | ( seederror ! = null ) ) {
// we don't like that address, delete it
// we don't like that address, delete it
peerActions . peerDeparture ( seed );
peerActions . peerDeparture ( seed , "peer ping to peer resulted in address = " + address + "; seederror = " + seederror );
sync . P ( ) ;
sync . P ( ) ;
} else {
} else {
// starting a new publisher thread
// starting a new publisher thread
@ -485,8 +487,9 @@ public class yacyCore {
if ( seed ! = null ) {
if ( seed ! = null ) {
String address = seed . getPublicAddress ( ) ;
String address = seed . getPublicAddress ( ) ;
log . logFine ( "HELLO x" + contactedSeedCount + " to peer '" + seed . get ( yacySeed . NAME , "" ) + "' at " + address ) ; // debug
log . logFine ( "HELLO x" + contactedSeedCount + " to peer '" + seed . get ( yacySeed . NAME , "" ) + "' at " + address ) ; // debug
if ( ( address = = null ) | | ( seed . isProper ( ) ! = null ) ) {
String seederror = seed . isProper ( ) ;
peerActions . peerDeparture ( seed ) ;
if ( ( address = = null ) | | ( seederror ! = null ) ) {
peerActions . peerDeparture ( seed , "initial peer ping to peer resulted in address = " + address + "; seederror = " + seederror ) ;
} else {
} else {
if ( seed . alternativeIP ! = null ) address = seed . alternativeIP + ":" + seed . getPort ( ) ;
if ( seed . alternativeIP ! = null ) address = seed . alternativeIP + ":" + seed . getPort ( ) ;
contactedSeedCount + + ;
contactedSeedCount + + ;
@ -495,7 +498,7 @@ public class yacyCore {
newSeeds = yacyClient . publishMySeed ( address , seed . hash ) ;
newSeeds = yacyClient . publishMySeed ( address , seed . hash ) ;
if ( newSeeds < 0 ) {
if ( newSeeds < 0 ) {
log . logInfo ( "publish: disconnected " + seed . get ( yacySeed . PEERTYPE , yacySeed . PEERTYPE_SENIOR ) + " peer '" + seed . getName ( ) + "' from " + seed . getPublicAddress ( ) ) ;
log . logInfo ( "publish: disconnected " + seed . get ( yacySeed . PEERTYPE , yacySeed . PEERTYPE_SENIOR ) + " peer '" + seed . getName ( ) + "' from " + seed . getPublicAddress ( ) ) ;
peerActions . peerDeparture ( seed );
peerActions . peerDeparture ( seed , "initial peer ping to peer resulted in seed response < 0" );
} else {
} else {
log . logInfo ( "publish: handshaked " + seed . get ( yacySeed . PEERTYPE , yacySeed . PEERTYPE_SENIOR ) + " peer '" + seed . getName ( ) + "' at " + seed . getPublicAddress ( ) ) ;
log . logInfo ( "publish: handshaked " + seed . get ( yacySeed . PEERTYPE , yacySeed . PEERTYPE_SENIOR ) + " peer '" + seed . getName ( ) + "' at " + seed . getPublicAddress ( ) ) ;
}
}