Skip to content

Commit

Permalink
Merge pull request #4689 from Rotzbua/fix_workaroud_dns
Browse files Browse the repository at this point in the history
fix(dns): remove outdated node check
  • Loading branch information
knolleary committed May 13, 2024
2 parents cf26209 + 47bf166 commit edc5e88
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/node_modules/node-red/lib/red.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ var api = require("@node-red/editor-api");
var server = null;
var apiEnabled = false;

const NODE_MAJOR_VERSION = process.versions.node.split('.')[0];
if (NODE_MAJOR_VERSION >= 16) {
const dns = require('dns');
dns.setDefaultResultOrder('ipv4first');
}
// Ensure ipv4 results are returned first: https://github.com/node-red/node-red/issues/4010
const dns = require('dns');
dns.setDefaultResultOrder('ipv4first');

function checkVersion(userSettings) {
var semver = require('semver');
Expand Down

0 comments on commit edc5e88

Please sign in to comment.