From 68a4f90fa9d44a3274303cc67d07b460e1a62b4d Mon Sep 17 00:00:00 2001 From: PobreGato <315121269+pobregat0@users.noreply.github.com> Date: Fri, 18 Sep 2026 22:17:59 -0400 Subject: [PATCH] call SendClose and Terminate through the service in Close --- libi2pd/Streaming.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libi2pd/Streaming.cpp b/libi2pd/Streaming.cpp index 6afddfce..954eaa0a 100644 --- a/libi2pd/Streaming.cpp +++ b/libi2pd/Streaming.cpp @@ -1403,19 +1403,19 @@ namespace stream break; case eStreamStatusReset: // TODO: send reset - Terminate (); + boost::asio::post (GetService (), std::bind (&Stream::Terminate, shared_from_this (), true)); break; case eStreamStatusClosing: if (m_SentPackets.empty () && m_SendBuffer.IsEmpty ()) // nothing to send { m_Status = eStreamStatusClosed; - SendClose(); + boost::asio::post (GetService (), std::bind (&Stream::SendClose, shared_from_this ())); } break; case eStreamStatusClosed: case eStreamStatusNew: // already closed - Terminate (); + boost::asio::post (GetService (), std::bind (&Stream::Terminate, shared_from_this (), true)); break; default: LogPrint (eLogWarning, "Streaming: Unexpected stream status=", (int)m_Status, " for sSID=", m_SendStreamID);