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,9 +206,12 @@ void CNetConnection::Disconnect(const char *pReason)
|
|||
else
|
||||
SendControl(NET_CTRLMSG_CLOSE, 0, 0);
|
||||
|
||||
m_ErrorString[0] = 0;
|
||||
if(pReason && pReason != m_ErrorString)
|
||||
str_copy(m_ErrorString, pReason, sizeof(m_ErrorString));
|
||||
if(pReason != m_ErrorString)
|
||||
{
|
||||
m_ErrorString[0] = 0;
|
||||
if(pReason)
|
||||
str_copy(m_ErrorString, pReason, sizeof(m_ErrorString));
|
||||
}
|
||||
}
|
||||
|
||||
Reset();
|
||||
|
|
Loading…
Reference in a new issue