mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
delete stream from inside
This commit is contained in:
parent
38ee813e41
commit
4e54fbec08
7 changed files with 17 additions and 19 deletions
|
@ -207,6 +207,7 @@ namespace stream
|
|||
m_IsOpen = false;
|
||||
m_IsReset = true;
|
||||
m_ReceiveTimer.cancel ();
|
||||
m_LocalDestination.DeleteStream (shared_from_this ());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -549,9 +550,11 @@ namespace stream
|
|||
packets.push_back (it);
|
||||
else
|
||||
{
|
||||
Close ();
|
||||
LogPrint (eLogWarning, "Packet ", it->GetSeqn (), "was not ACKed after ", MAX_NUM_RESEND_ATTEMPTS, " attempts. Terminate");
|
||||
m_IsOpen = false;
|
||||
m_IsReset = true;
|
||||
m_ReceiveTimer.cancel ();
|
||||
m_LocalDestination.DeleteStream (shared_from_this ());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -715,11 +718,5 @@ namespace stream
|
|||
delete uncompressed;
|
||||
}
|
||||
}
|
||||
|
||||
void DeleteStream (std::shared_ptr<Stream> stream)
|
||||
{
|
||||
if (stream)
|
||||
stream->GetLocalDestination ().DeleteStream (stream);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue