From 060a06483b156c1dd1a6d7ba55d4de3cb1fbb7eb Mon Sep 17 00:00:00 2001 From: orignal Date: Mon, 24 Aug 2026 16:15:40 -0400 Subject: [PATCH] don't connect to self --- libi2pd_client/Torrents.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libi2pd_client/Torrents.cpp b/libi2pd_client/Torrents.cpp index b17a2634..fb1e159f 100644 --- a/libi2pd_client/Torrents.cpp +++ b/libi2pd_client/Torrents.cpp @@ -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 stream) { if (stream)