mirror of
https://github.com/OpenFusionProject/Client.git
synced 2024-11-22 13:40:06 +00:00
Fix DNS resolution
not sure why this works but resolve4 doesn't
This commit is contained in:
parent
dabb8bf484
commit
ab5de9488d
@ -280,10 +280,10 @@ function setGameInfo(serverUUID) {
|
|||||||
|
|
||||||
// DNS resolution. there is no synchronous version for some stupid reason
|
// DNS resolution. there is no synchronous version for some stupid reason
|
||||||
if (!address.match(/^[0-9.]+$/))
|
if (!address.match(/^[0-9.]+$/))
|
||||||
dns.resolve4(address, function (err, res) {
|
dns.lookup(address, family=4, function (err, resolvedAddress) {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
console.log("Resolved " + address + " to " + res[0]);
|
console.log("Resolved " + address + " to " + resolvedAddress);
|
||||||
address = res[0];
|
address = resolvedAddress;
|
||||||
} else {
|
} else {
|
||||||
console.log("Err: " + err.code);
|
console.log("Err: " + err.code);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user