mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 12:24:19 +00:00
cleanup queue after buffers deletion
This commit is contained in:
parent
242fb7db14
commit
ff971563db
@ -364,6 +364,7 @@ namespace client
|
|||||||
{
|
{
|
||||||
for (auto& it: *m_SendQueue)
|
for (auto& it: *m_SendQueue)
|
||||||
delete[] boost::asio::buffer_cast<const uint8_t *>(it);
|
delete[] boost::asio::buffer_cast<const uint8_t *>(it);
|
||||||
|
m_SendQueue->clear ();
|
||||||
m_SendQueue = nullptr;
|
m_SendQueue = nullptr;
|
||||||
}
|
}
|
||||||
if (m_SessionID != 0xFFFF)
|
if (m_SessionID != 0xFFFF)
|
||||||
@ -415,7 +416,8 @@ namespace client
|
|||||||
void I2CPSession::HandleI2CPMessageSentQueue (const boost::system::error_code& ecode, std::size_t bytes_transferred, SendQueue queue)
|
void I2CPSession::HandleI2CPMessageSentQueue (const boost::system::error_code& ecode, std::size_t bytes_transferred, SendQueue queue)
|
||||||
{
|
{
|
||||||
for (auto& it: *queue)
|
for (auto& it: *queue)
|
||||||
delete[] boost::asio::buffer_cast<const uint8_t *>(it);;
|
delete[] boost::asio::buffer_cast<const uint8_t *>(it);
|
||||||
|
queue->clear ();
|
||||||
|
|
||||||
HandleI2CPMessageSent (ecode, bytes_transferred);
|
HandleI2CPMessageSent (ecode, bytes_transferred);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user