mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-18 20:59:57 +00:00
drop unsent messages if session disconnects
This commit is contained in:
parent
e40b656ecf
commit
0ca782ed71
@ -373,6 +373,8 @@ namespace transport
|
|||||||
m_Socket.close ();
|
m_Socket.close ();
|
||||||
transports.PeerDisconnected (shared_from_this ());
|
transports.PeerDisconnected (shared_from_this ());
|
||||||
m_Server.RemoveNTCP2Session (shared_from_this ());
|
m_Server.RemoveNTCP2Session (shared_from_this ());
|
||||||
|
for (auto& it: m_SendQueue)
|
||||||
|
it->Drop ();
|
||||||
m_SendQueue.clear ();
|
m_SendQueue.clear ();
|
||||||
SetSendQueueSize (0);
|
SetSendQueueSize (0);
|
||||||
auto remoteIdentity = GetRemoteIdentity ();
|
auto remoteIdentity = GetRemoteIdentity ();
|
||||||
|
@ -262,6 +262,8 @@ namespace transport
|
|||||||
m_SentHandshakePacket.reset (nullptr);
|
m_SentHandshakePacket.reset (nullptr);
|
||||||
m_SessionConfirmedFragment.reset (nullptr);
|
m_SessionConfirmedFragment.reset (nullptr);
|
||||||
m_PathChallenge.reset (nullptr);
|
m_PathChallenge.reset (nullptr);
|
||||||
|
for (auto& it: m_SendQueue)
|
||||||
|
it->Drop ();
|
||||||
m_SendQueue.clear ();
|
m_SendQueue.clear ();
|
||||||
SetSendQueueSize (0);
|
SetSendQueueSize (0);
|
||||||
m_SentPackets.clear ();
|
m_SentPackets.clear ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user