mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-08-27 12:41:32 +00:00
guard GameSend when game is not connected
prevents WSAENOTSOCK
This commit is contained in:
@@ -62,6 +62,8 @@ bool CheckBytes(uint32_t Bytes) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GameSend(std::string_view Data) {
|
void GameSend(std::string_view Data) {
|
||||||
|
if (!GConnected)
|
||||||
|
return;
|
||||||
static std::mutex Lock;
|
static std::mutex Lock;
|
||||||
std::scoped_lock Guard(Lock);
|
std::scoped_lock Guard(Lock);
|
||||||
auto ToSend = Utils::PrependHeader<std::string_view>(Data);
|
auto ToSend = Utils::PrependHeader<std::string_view>(Data);
|
||||||
|
|||||||
Reference in New Issue
Block a user