1
0

Disconnect: call HandleOutgoingData one last time

* Fixes #5285
This commit is contained in:
Tiger Wang 2021-08-26 21:55:09 +01:00
parent 4b8952e438
commit 11ca2cf4c0

View File

@ -133,6 +133,7 @@ void cClientHandle::Destroy(void)
{
cCSLock Lock(m_CSOutgoingData);
m_Protocol.HandleOutgoingData(m_OutgoingData); // Finalise any encryption.
m_Link->Send(m_OutgoingData.data(), m_OutgoingData.size()); // Flush remaining data.
m_Link->Shutdown(); // Cleanly close the connection.
m_Link.reset(); // Release the strong reference cTCPLink holds to ourself.