mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-07-01 15:36:10 +00:00
Patch up removal of while loop in Core
This commit is contained in:
parent
deed24f6e8
commit
a128099619
@ -51,7 +51,7 @@ bool SecurityWarning() {
|
||||
confirmed = -1;
|
||||
CoreSend("WMODS_FOUND");
|
||||
|
||||
while (confirmed == -1)
|
||||
while (confirmed == -1 || Terminate == false)
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||
|
||||
if (confirmed == 1)
|
||||
@ -73,6 +73,7 @@ void StartSync(const std::string& Data) {
|
||||
else
|
||||
UlStatus = "UlConnection Failed! (WSA failed to start)";
|
||||
Terminate = true;
|
||||
CoreSend("L");
|
||||
return;
|
||||
}
|
||||
CheckLocalKey();
|
||||
|
@ -63,16 +63,20 @@ std::string Auth(SOCKET Sock) {
|
||||
|
||||
if (Res.empty() || Res[0] == 'E' || Res[0] == 'K') {
|
||||
Abord();
|
||||
CoreSend("L");
|
||||
return "";
|
||||
}
|
||||
|
||||
TCPSend(PublicKey, Sock);
|
||||
if (Terminate)
|
||||
if (Terminate) {
|
||||
CoreSend("L");
|
||||
return "";
|
||||
}
|
||||
|
||||
Res = TCPRcv(Sock);
|
||||
if (Res.empty() || Res[0] != 'P') {
|
||||
Abord();
|
||||
CoreSend("L");
|
||||
return "";
|
||||
}
|
||||
|
||||
@ -81,17 +85,21 @@ std::string Auth(SOCKET Sock) {
|
||||
ClientID = std::stoi(Res);
|
||||
} else {
|
||||
Abord();
|
||||
CoreSend("L");
|
||||
UUl("Authentication failed!");
|
||||
return "";
|
||||
}
|
||||
TCPSend("SR", Sock);
|
||||
if (Terminate)
|
||||
if (Terminate) {
|
||||
CoreSend("L");
|
||||
return "";
|
||||
}
|
||||
|
||||
Res = TCPRcv(Sock);
|
||||
|
||||
if (Res[0] == 'E' || Res[0] == 'K') {
|
||||
Abord();
|
||||
CoreSend("L");
|
||||
return "";
|
||||
}
|
||||
|
||||
|
@ -152,6 +152,7 @@ void TCPClientMain(const std::string& IP, int Port) {
|
||||
KillSocket(TCPSock);
|
||||
WSACleanup();
|
||||
Terminate = true;
|
||||
CoreSend("L");
|
||||
return;
|
||||
}
|
||||
info("Connected!");
|
||||
|
Loading…
x
Reference in New Issue
Block a user