Close SDK connection if magic value is not correctly received

This commit is contained in:
Adam Honse
2026-04-14 01:02:00 -05:00
parent 4fe6e45b9f
commit 833778f2a3
2 changed files with 5 additions and 3 deletions

View File

@@ -1014,6 +1014,7 @@ void NetworkClient::ListenThreadFunction()
if(bytes_read <= 0)
{
LOG_ERROR("[%s] recv_select failed receiving magic, closing listener", NETWORKCLIENT);
goto listen_done;
}
@@ -1022,7 +1023,8 @@ void NetworkClient::ListenThreadFunction()
\*---------------------------------------------------------*/
if(header.pkt_magic[i] != openrgb_sdk_magic[i])
{
continue;
LOG_ERROR("[%s] Invalid magic received, closing listener", NETWORKCLIENT);
goto listen_done;
}
}