1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-08 22:57:52 +00:00

delete packet if not saved

This commit is contained in:
Jeff Becker 2016-03-27 09:16:30 -04:00
parent 598d0e216a
commit 5c9970c786
No known key found for this signature in database
GPG Key ID: AB950234D6EA286B

View File

@ -162,7 +162,9 @@ namespace stream
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)