mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-12 17:19:28 +01:00
Fix two more sleep bugs.
This commit is contained in:
1 parent
6336435f81
commit
84df417a01
2 files changed
+3
-10
No files matched your search
+1
-5
@@ -85,11 +85,7 @@ bool Connection::Connect(int maxTries) {
|
||||
if (retval >= 0)
|
||||
return true;
|
||||
}
|
||||
#ifdef _WIN32
|
||||
Sleep(1);
|
||||
#else
|
||||
sleep(1);
|
||||
#endif
|
||||
sleep_ms(1);
|
||||
}
|
||||
|
||||
// Let's not leak this socket.
|
||||
|
||||
+2
-5
@@ -1,5 +1,6 @@
|
||||
#include "net/resolve.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/timeutil.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -98,11 +99,7 @@ bool DNSResolve(const std::string &host, const std::string &service, addrinfo **
|
||||
int result = getaddrinfo(host.c_str(), servicep, &hints, res);
|
||||
if (result == EAI_AGAIN) {
|
||||
// Temporary failure. Since this already blocks, let's just try once more.
|
||||
#ifdef _WIN32
|
||||
Sleep(1);
|
||||
#else
|
||||
sleep(1);
|
||||
#endif
|
||||
sleep_ms(1);
|
||||
result = getaddrinfo(host.c_str(), servicep, &hints, res);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user