mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-14 19:08:08 +00:00
Don't leak the sockets that won't connect
This commit is contained in:
parent
0421607c00
commit
24bc0b067b
@ -121,6 +121,7 @@ bool Connection::Connect(int maxTries, double timeout, bool *cancelConnect) {
|
||||
if (connect(sock, possible->ai_addr, (int)possible->ai_addrlen) < 0) {
|
||||
if (errno != EINPROGRESS) {
|
||||
ERROR_LOG(HTTP, "connect(%d) call failed (%d: %s)", sock, errno, strerror(errno));
|
||||
closesocket(sock);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user