Network/ENetHost: Fix hostname resolve
This commit is contained in:
parent
cbcfa5cb4d
commit
394f0bc730
|
|
@ -128,13 +128,18 @@ namespace Nz
|
||||||
if (!result.address)
|
if (!result.address)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (result.socketType != SocketType_UDP)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
hostnameAddress = result.address;
|
hostnameAddress = result.address;
|
||||||
break; //< Take first valid address
|
break; //< Take first valid address
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!hostnameAddress.IsValid())
|
||||||
|
{
|
||||||
|
if (error)
|
||||||
|
*error = ResolveError_NotFound;
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
return Connect(hostnameAddress, channelCount, data);
|
return Connect(hostnameAddress, channelCount, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue