refactor some code to prevent possible crashes and bugs

This commit is contained in:
mq1n
2025-09-02 19:03:54 +03:00
parent 3de9fb33b5
commit 4ebc19a261
7 changed files with 86 additions and 64 deletions

View File

@@ -428,6 +428,13 @@ void DESC::Packet(const void * c_pvData, int iSize)
if (m_iPhase == PHASE_CLOSE) // 끊는 상태면 보내지 않는다.
return;
if (!m_lpOutputBuffer)
{
sys_err("DESC::Packet: Trying to send packet but output buffer is NULL! (DESC: %p)", this);
SetPhase(PHASE_CLOSE);
return;
}
if (m_stRelayName.length() != 0)
{
// Relay 패킷은 암호화하지 않는다.