From aafaebc560870943c58634dfefd2f6674d4b89de Mon Sep 17 00:00:00 2001 From: orignal Date: Sun, 26 Oct 2025 19:19:56 -0400 Subject: [PATCH] read UDP associate socket until close --- libi2pd_client/SOCKS.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libi2pd_client/SOCKS.cpp b/libi2pd_client/SOCKS.cpp index b4e4af01..e0fdff64 100644 --- a/libi2pd_client/SOCKS.cpp +++ b/libi2pd_client/SOCKS.cpp @@ -686,20 +686,21 @@ namespace proxy { if (!ecode) { - if (Kill()) return; if (m_cmd == CMD_CONNECT) { + if (Kill()) return; LogPrint (eLogInfo, "SOCKS: New I2PTunnel connection"); auto connection = std::make_shared(GetOwner(), m_sock, m_stream); GetOwner()->AddHandler (connection); connection->I2PConnect (m_remaining_data,m_remaining_data_len); + Done(shared_from_this()); } else if (m_cmd == CMD_UDP && m_UDPTunnel) { LogPrint (eLogInfo, "SOCKS: Start UDP tunnel"); m_UDPTunnel->Start (); + AsyncSockRead (); // associate socket } - Done(shared_from_this()); } else {