changed settings value error to just set to auto

647b89f8adb7a2be7ac9a055f41ca4ae48ee3958

BPplays <andymalbp@gmail.com>

1 files changed, +6 -6Showing whitespace changes
server.js+6 -6
@@ -264,8 +264,8 @@ const enableAccounts = getConfigValue('enableUserAccounts', DEFAULT_ACCOUNTS);
264const uploadsPath = path.join(dataRoot, UPLOADS_DIRECTORY);264const uploadsPath = path.join(dataRoot, UPLOADS_DIRECTORY);
265265
266266
267const enableIPv6 = stringToBool(cliArguments.enableIPv6) ?? getConfigValue('protocol.ipv6', DEFAULT_ENABLE_IPV6);267let enableIPv6 = stringToBool(cliArguments.enableIPv6) ?? getConfigValue('protocol.ipv6', DEFAULT_ENABLE_IPV6);
268const enableIPv4 = stringToBool(cliArguments.enableIPv4) ?? getConfigValue('protocol.ipv4', DEFAULT_ENABLE_IPV4);268let enableIPv4 = stringToBool(cliArguments.enableIPv4) ?? getConfigValue('protocol.ipv4', DEFAULT_ENABLE_IPV4);
269269
270const autorunHostname = cliArguments.autorunHostname ?? getConfigValue('autorunHostname', DEFAULT_AUTORUN_HOSTNAME);270const autorunHostname = cliArguments.autorunHostname ?? getConfigValue('autorunHostname', DEFAULT_AUTORUN_HOSTNAME);
271const autorunPortOverride = cliArguments.autorunPortOverride ?? getConfigValue('autorunPortOverride', DEFAULT_AUTORUN_PORT);271const autorunPortOverride = cliArguments.autorunPortOverride ?? getConfigValue('autorunPortOverride', DEFAULT_AUTORUN_PORT);
@@ -292,12 +292,12 @@ if (dnsPreferIPv6) {
292const ipOptions = [true, 'auto', false];292const ipOptions = [true, 'auto', false];
293293
294if (!ipOptions.includes(enableIPv6)) {294if (!ipOptions.includes(enableIPv6)) {
295 console.error('`protocol: ipv6` option invalid\n use:', ipOptions);295 console.warn('`protocol: ipv6` option invalid\n use:', ipOptions, "\n setting to: auto");
296 process.exit(1);296 enableIPv6 = 'auto';
297}297}
298if (!ipOptions.includes(enableIPv4)) {298if (!ipOptions.includes(enableIPv4)) {
299 console.error('`protocol: ipv4` option invalid\n use:', ipOptions);299 console.warn('`protocol: ipv4` option invalid\n use:', ipOptions, "\n setting to: auto");
300 process.exit(1);300 enableIPv4 = 'auto';
301}301}
302302
303if (enableIPv6 === false && enableIPv4 === false) {303if (enableIPv6 === false && enableIPv4 === false) {