From 86965b0542f11674fc9923f83520901a3d02be5b Mon Sep 17 00:00:00 2001 From: PobreGato <315121269+pobregat0@users.noreply.github.com> Date: Sun, 30 Aug 2026 04:40:51 +0300 Subject: [PATCH] own SOCKS UDP tunnel by shared_ptr --- libi2pd_client/SOCKS.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libi2pd_client/SOCKS.cpp b/libi2pd_client/SOCKS.cpp index 8677fdbc..74df7a43 100644 --- a/libi2pd_client/SOCKS.cpp +++ b/libi2pd_client/SOCKS.cpp @@ -175,7 +175,7 @@ namespace proxy const bool m_UseUpstreamProxy; // do we want to use the upstream proxy for non i2p addresses? const std::string m_UpstreamProxyAddress; const uint16_t m_UpstreamProxyPort; - std::unique_ptr m_UDPTunnel; + std::shared_ptr m_UDPTunnel; // shared, the tunnel takes references to itself public: @@ -710,7 +710,7 @@ namespace proxy LogPrint (eLogInfo, "SOCKS: New UDP associate connection"); auto owner = GetOwner (); if (!owner) { Terminate (); return; } - m_UDPTunnel = std::make_unique("", addr, + m_UDPTunnel = std::make_shared("", addr, GetServer ()->GetNextLocalUDPEndpoint (), owner->GetLocalDestination (), m_port, false, i2p::datagram::eDatagramV3); boost::asio::post (owner->GetService (), [this](void)