mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 18:18:18 +00:00
Only clear the error string if none is given
This commit is contained in:
parent
2d404bdfa0
commit
19e9f4e2fb
|
@ -206,10 +206,13 @@ void CNetConnection::Disconnect(const char *pReason)
|
||||||
else
|
else
|
||||||
SendControl(NET_CTRLMSG_CLOSE, 0, 0);
|
SendControl(NET_CTRLMSG_CLOSE, 0, 0);
|
||||||
|
|
||||||
|
if(pReason != m_ErrorString)
|
||||||
|
{
|
||||||
m_ErrorString[0] = 0;
|
m_ErrorString[0] = 0;
|
||||||
if(pReason && pReason != m_ErrorString)
|
if(pReason)
|
||||||
str_copy(m_ErrorString, pReason, sizeof(m_ErrorString));
|
str_copy(m_ErrorString, pReason, sizeof(m_ErrorString));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue