mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
destroy socket upon receive an ack for close
This commit is contained in:
parent
91ec08df4e
commit
4cf5ce871f
@ -36,7 +36,6 @@ namespace stream
|
||||
|
||||
Stream::~Stream ()
|
||||
{
|
||||
Terminate ();
|
||||
while (!m_ReceiveQueue.empty ())
|
||||
{
|
||||
auto packet = m_ReceiveQueue.front ();
|
||||
@ -302,7 +301,9 @@ namespace stream
|
||||
m_NumResendAttempts = 0;
|
||||
SendBuffer ();
|
||||
}
|
||||
if (m_Status == eStreamStatusClosing)
|
||||
if (m_Status == eStreamStatusClosed)
|
||||
Terminate ();
|
||||
else if (m_Status == eStreamStatusClosing)
|
||||
Close (); // check is all outgoing messages have been sent and we can send close
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user