fixed the connect call always taking the address of the first result from getaddrinfo

This commit is contained in:
myT 2018-01-17 05:50:33 +01:00
parent 04c765f46c
commit 24fac5557c
2 changed files with 3 additions and 1 deletions

View file

@ -6,6 +6,8 @@ chg: on Windows, a fatal error will move the early console window to the foregro
chg: com_hunkMegs doesn't have a maximum value anymore
a value too high would reset it and the engine might fail to load with the default value
fix: cl_allowDownload 1 failing on "connect" (error 10047 on Windows)
fix: cl_allowDownload 1 was using the current directory instead of fs_basepath
fix: jitter due to snapshots piling up with the same server timestamp for loopback and LAN clients

View file

@ -386,7 +386,7 @@ static qbool Download_Begin( mapDownload_t* dl, int port, const char* server, co
continue;
}
if (connect(dl->socket, address->ai_addr, address->ai_addrlen) == SOCKET_ERROR) {
if (connect(dl->socket, a->ai_addr, a->ai_addrlen) == SOCKET_ERROR) {
PrintSocketError(dl, "connect");
if (dl->socket != INVALID_SOCKET) {
Q_closesocket(dl->socket);