mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-05 12:15:19 +02:00
Don't leak the sockets that won't connect
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user