mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-23 13:57:16 +01:00
delete packet if not saved
This commit is contained in:
parent
598d0e216a
commit
5c9970c786
|
@ -162,7 +162,9 @@ namespace stream
|
||||||
|
|
||||||
void Stream::SavePacket (Packet * packet)
|
void Stream::SavePacket (Packet * packet)
|
||||||
{
|
{
|
||||||
m_SavedPackets.insert (packet);
|
auto ins = m_SavedPackets.insert (packet);
|
||||||
|
// delete packed if not saved
|
||||||
|
if (!ins.second) delete packet;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Stream::ProcessPacket (Packet * packet)
|
void Stream::ProcessPacket (Packet * packet)
|
||||||
|
|
Loading…
Reference in a new issue