Don't send disconnect on timeout

This commit is contained in:
Tim Schumacher 2016-07-08 17:00:47 +02:00
parent 35bd378a62
commit 46b75886c9

View file

@ -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)
{