forked from I2P_Developers/i2p.i2p
Several connect-to-self checks
This commit is contained in:
@ -30,6 +30,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.i2p.client.streaming.I2PSocket;
|
||||
import net.i2p.data.DataHelper;
|
||||
import net.i2p.util.Log;
|
||||
|
||||
public class Peer implements Comparable
|
||||
@ -353,6 +354,9 @@ public class Peer implements Comparable
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("Read the remote side's hash and peerID fully from " + toString());
|
||||
|
||||
if (DataHelper.eq(my_id, bs))
|
||||
throw new IOException("Connected to myself");
|
||||
|
||||
if (options != 0) {
|
||||
// send them something in runConnection() above
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
|
Reference in New Issue
Block a user