Improve: Avoid client computer going to sleep

This commit is contained in:
yuanyuanxiang
2025-07-26 22:49:57 +08:00
parent 43aa89b96d
commit b9228cf1e1
4 changed files with 15 additions and 1 deletions

View File

@@ -175,6 +175,7 @@ public:
serverAddr.sin_addr.s_addr = inet_addr(ip.c_str());
if (connect(clientSocket, (SOCKADDR*)&serverAddr, sizeof(serverAddr)) == SOCKET_ERROR) {
closesocket(clientSocket);
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED);
continue;
}
#ifdef _DEBUG