From e6088eb30fab19d08382b02b7425c2c2d21b518a Mon Sep 17 00:00:00 2001 From: orignal Date: Tue, 28 Jul 2026 21:47:03 -0400 Subject: [PATCH] let pending operations complete when stream received FIN --- libi2pd/Streaming.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libi2pd/Streaming.cpp b/libi2pd/Streaming.cpp index 8e927a80..5608e1fd 100644 --- a/libi2pd/Streaming.cpp +++ b/libi2pd/Streaming.cpp @@ -177,11 +177,11 @@ namespace stream void Stream::Terminate (bool deleteFromDestination) // should be called from StreamingDestination::Stop only { - m_Status = eStreamStatusTerminated; m_AckSendTimer.cancel (); m_ReceiveTimer.cancel (); m_ResendTimer.cancel (); m_SendTimer.cancel (); + m_Status = eStreamStatusTerminated; //CleanUp (); /* Need to recheck - broke working on windows */ if (deleteFromDestination) m_LocalDestination.DeleteStream (shared_from_this ()); @@ -442,7 +442,7 @@ namespace stream if (m_Status != eStreamStatusClosed) SendClose (); m_Status = eStreamStatusClosed; - Terminate (); + boost::asio::post (GetService (), std::bind (&Stream::Terminate, shared_from_this (), true)); } }