mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-24 06:25:01 -04:00
Close SDK connection if magic value is not correctly received
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1075,8 +1075,8 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
|
||||
\*---------------------------------------------*/
|
||||
if(header.pkt_magic[i] != openrgb_sdk_magic[i])
|
||||
{
|
||||
LOG_ERROR("[%s] Invalid magic received", NETWORKSERVER);
|
||||
continue;
|
||||
LOG_ERROR("[%s] Invalid magic received, closing listener", NETWORKSERVER);
|
||||
goto listen_done;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user