mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-10-23 08:32:43 +00:00
don't connect to self
This commit is contained in:
1 parent
465e17a9b9
commit
060a06483b
1 file changed
+5
@@ -1947,6 +1947,11 @@ namespace torrents
|
||||
{
|
||||
if (!torrent) return;
|
||||
LogPrint (eLogDebug, "Torrents: Connecting to peer ", peer.ToBase32 () + ".b32.i2p");
|
||||
if (peer == GetLocalDestination ()->GetIdentHash ())
|
||||
{
|
||||
LogPrint (eLogInfo, "Torrents: Can't connect to self");
|
||||
return;
|
||||
}
|
||||
CreateStream ([this, torrent, peer](std::shared_ptr<i2p::stream::Stream> stream)
|
||||
{
|
||||
if (stream)
|
||||
|
||||
Reference in new issue
Block a user