From dc1a0ebe941f8a8b66e8ce85819f117bc8f2b2ed Mon Sep 17 00:00:00 2001 From: PobreGato <315121269+pobregat0@users.noreply.github.com> Date: Wed, 2 Sep 2026 01:37:06 +0300 Subject: [PATCH] don't send packets from a terminated stream --- libi2pd/Streaming.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libi2pd/Streaming.cpp b/libi2pd/Streaming.cpp index d59ab3a5..6afddfce 100644 --- a/libi2pd/Streaming.cpp +++ b/libi2pd/Streaming.cpp @@ -1531,6 +1531,9 @@ namespace stream void Stream::SendPackets (const std::list& packets) { + // the local destination is a reference and it can be gone already: a handler + // queued before the destination was stopped runs after it + if (m_Status == eStreamStatusTerminated) return; if (!m_RemoteLeaseSet) { CancelRemoteLeaseChange ();