more jsdoc stuff
| @@ -998,7 +998,13 @@ async function startHTTPorHTTPS(useIPv6, useIPv4) { | |||
| 998 | async function startServer() { | 998 | async function startServer() { |
| 999 | let useIPv6 = (enableIPv6 === true); | 999 | let useIPv6 = (enableIPv6 === true); |
| 1000 | let useIPv4 = (enableIPv4 === true); | 1000 | let useIPv4 = (enableIPv4 === true); |
| 1001 | let hasIPv6, hasIPv4, hasIPv6Local, hasIPv4Local, hasIPv6Any, hasIPv4Any; | 1001 | |
| 1002 | let /** @type {boolean} */ hasIPv6, | ||
| 1003 | /** @type {boolean} */ hasIPv4, | ||
| 1004 | /** @type {boolean} */ hasIPv6Local, | ||
| 1005 | /** @type {boolean} */ hasIPv4Local, | ||
| 1006 | /** @type {boolean} */ hasIPv6Any, | ||
| 1007 | /** @type {boolean} */ hasIPv4Any; | ||
| 1002 | 1008 | ||
| 1003 | 1009 | ||
| 1004 | if (enableIPv6 === 'auto' || enableIPv4 === 'auto') { | 1010 | if (enableIPv6 === 'auto' || enableIPv4 === 'auto') { |
| @@ -1028,10 +1034,6 @@ async function startServer() { | |||
| 1028 | console.log('IPv4 support detected (but disabled)'); | 1034 | console.log('IPv4 support detected (but disabled)'); |
| 1029 | } | 1035 | } |
| 1030 | } | 1036 | } |
| 1031 | } else { | ||
| 1032 | console.log('Neither protocol: ipv6, nor ipv4 are set to auto, skipping detection'); | ||
| 1033 | } | ||
| 1034 | |||
| 1035 | 1037 | ||
| 1036 | 1038 | ||
| 1037 | if (enableIPv6 === 'auto' && enableIPv4 === 'auto') { | 1039 | if (enableIPv6 === 'auto' && enableIPv4 === 'auto') { |
| @@ -1041,6 +1043,13 @@ async function startServer() { | |||
| 1041 | } | 1043 | } |
| 1042 | } | 1044 | } |
| 1043 | 1045 | ||
| 1046 | } else { | ||
| 1047 | console.log('Neither protocol: ipv6, nor ipv4 are set to auto, skipping detection'); | ||
| 1048 | } | ||
| 1049 | |||
| 1050 | |||
| 1051 | |||
| 1052 | |||
| 1044 | if (!useIPv6 && !useIPv4) { | 1053 | if (!useIPv6 && !useIPv4) { |
| 1045 | console.error('Both IPv6 and IPv4 are disabled,\nP.S. you should never see this error, at least at one point it was checked for before this, with the rest of the config options'); | 1054 | console.error('Both IPv6 and IPv4 are disabled,\nP.S. you should never see this error, at least at one point it was checked for before this, with the rest of the config options'); |
| 1046 | process.exit(1); | 1055 | process.exit(1); |