Fixed a possible deadlock on client disconnect.
This commit is contained in:
parent
f0a75f7f73
commit
6c1d992eeb
@ -148,15 +148,6 @@ cClientHandle::~cClientHandle()
|
|||||||
SendDisconnect("Server shut down? Kthnxbai");
|
SendDisconnect("Server shut down? Kthnxbai");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Queue all remaining outgoing packets to cSocketThreads:
|
|
||||||
{
|
|
||||||
cCSLock Lock(m_CSOutgoingData);
|
|
||||||
AString Data;
|
|
||||||
m_OutgoingData.ReadAll(Data);
|
|
||||||
m_OutgoingData.CommitRead();
|
|
||||||
cRoot::Get()->GetServer()->WriteToClient(this, Data);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Close the socket as soon as it sends all outgoing data:
|
// Close the socket as soon as it sends all outgoing data:
|
||||||
cRoot::Get()->GetServer()->RemoveClient(this);
|
cRoot::Get()->GetServer()->RemoveClient(this);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user