mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Don't send disconnect on timeout
This commit is contained in:
parent
35bd378a62
commit
46b75886c9
|
@ -201,10 +201,13 @@ void CNetConnection::Disconnect(const char *pReason)
|
|||
|
||||
if(m_RemoteClosed == 0)
|
||||
{
|
||||
if(pReason)
|
||||
SendControl(NET_CTRLMSG_CLOSE, pReason, str_length(pReason)+1);
|
||||
else
|
||||
SendControl(NET_CTRLMSG_CLOSE, 0, 0);
|
||||
if(!m_TimeoutSituation)
|
||||
{
|
||||
if(pReason)
|
||||
SendControl(NET_CTRLMSG_CLOSE, pReason, str_length(pReason)+1);
|
||||
else
|
||||
SendControl(NET_CTRLMSG_CLOSE, 0, 0);
|
||||
}
|
||||
|
||||
if(pReason != m_ErrorString)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue