guard GameSend when game is not connected

prevents WSAENOTSOCK
This commit is contained in:
galacticlemonade
2026-04-08 15:05:58 -06:00
committed by GitHub
parent f30a88e76e
commit 2a92a08587
+2
View File
@@ -62,6 +62,8 @@ bool CheckBytes(uint32_t Bytes) {
}
void GameSend(std::string_view Data) {
if (!GConnected)
return;
static std::mutex Lock;
std::scoped_lock Guard(Lock);
auto ToSend = Utils::PrependHeader<std::string_view>(Data);