mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-06-17 14:21:30 +00:00
Always use the test port
This commit is contained in:
@@ -435,9 +435,8 @@ int resolveHostName(const char* host, int family, int tcpTestPort, struct sockad
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (currentAddr = res; currentAddr != NULL; currentAddr = currentAddr->ai_next) {
|
for (currentAddr = res; currentAddr != NULL; currentAddr = currentAddr->ai_next) {
|
||||||
// Use the test port to ensure this address is working if there
|
// Use the test port to ensure this address is working
|
||||||
// are multiple addresses for this host name
|
if (tcpTestPort != 0) {
|
||||||
if (tcpTestPort != 0 && res->ai_next != NULL) {
|
|
||||||
SOCKET testSocket = connectTcpSocket((struct sockaddr_storage*)currentAddr->ai_addr,
|
SOCKET testSocket = connectTcpSocket((struct sockaddr_storage*)currentAddr->ai_addr,
|
||||||
currentAddr->ai_addrlen,
|
currentAddr->ai_addrlen,
|
||||||
tcpTestPort,
|
tcpTestPort,
|
||||||
|
|||||||
Reference in New Issue
Block a user