skip duplicate error string. Closes #1339

This commit is contained in:
oy 2015-07-05 12:43:04 +02:00
parent 6722e8e3b1
commit 014f77eefc

View file

@ -187,9 +187,13 @@ void CNetConnection::Disconnect(const char *pReason)
else
SendControl(NET_CTRLMSG_CLOSE, 0, 0);
m_ErrorString[0] = 0;
if(pReason)
str_copy(m_ErrorString, pReason, sizeof(m_ErrorString));
if(pReason != m_ErrorString)
{
if(pReason)
str_copy(m_ErrorString, pReason, sizeof(m_ErrorString));
else
m_ErrorString[0] = 0;
}
}
Reset();