mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-08-29 05:21:10 +00:00
tweaks
This commit is contained in:
+6
-7
@@ -57,6 +57,7 @@ std::string Parse(const std::string& Data){
|
|||||||
bool once = false;
|
bool once = false;
|
||||||
[[noreturn]] void MemoryInit();
|
[[noreturn]] void MemoryInit();
|
||||||
[[noreturn]] void CoreNetworkThread(){
|
[[noreturn]] void CoreNetworkThread(){
|
||||||
|
try {
|
||||||
std::cout << "Ready!" << std::endl;
|
std::cout << "Ready!" << std::endl;
|
||||||
do {
|
do {
|
||||||
if (MPDEV)std::cout << "Core Network on start!" << std::endl;
|
if (MPDEV)std::cout << "Core Network on start!" << std::endl;
|
||||||
@@ -100,14 +101,7 @@ bool once = false;
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Setup the TCP listening socket
|
// Setup the TCP listening socket
|
||||||
try{
|
|
||||||
|
|
||||||
iResult = bind(ListenSocket, result->ai_addr, (int) result->ai_addrlen);
|
iResult = bind(ListenSocket, result->ai_addr, (int) result->ai_addrlen);
|
||||||
} catch (std::exception&e) {
|
|
||||||
std::cout << "Exception! : " << e.what() << std::endl;
|
|
||||||
system("pause");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
if (iResult == SOCKET_ERROR) {
|
if (iResult == SOCKET_ERROR) {
|
||||||
if (MPDEV)Exit("(Core) bind failed with error: " + std::to_string(WSAGetLastError()));
|
if (MPDEV)Exit("(Core) bind failed with error: " + std::to_string(WSAGetLastError()));
|
||||||
freeaddrinfo(result);
|
freeaddrinfo(result);
|
||||||
@@ -171,4 +165,9 @@ bool once = false;
|
|||||||
closesocket(ClientSocket);
|
closesocket(ClientSocket);
|
||||||
WSACleanup();
|
WSACleanup();
|
||||||
} while (true);
|
} while (true);
|
||||||
|
} catch (std::exception&e) {
|
||||||
|
std::cout << "Exception! : " << e.what() << std::endl;
|
||||||
|
system("pause");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user