| 955 | 955 | async function startServer() { |
| 956 | 956 | let useIPv6 = (enableIPv6 === true); |
| 957 | 957 | let useIPv4 = (enableIPv4 === true); |
| 958 | 958 | let hasIPv6, hasIPv4, hasIPv6Local, hasIPv4Local, hasIPv6NonLocalhasIPv6Any, hasIPv4NonLocalhasIPv4Any; |
| 959 | 959 | |
| 960 | 960 | |
| 961 | 961 | if (enableIPv6 === 'auto' || enableIPv4 === 'auto') { |
| 962 | 962 | [hasIPv6NonLocalhasIPv6Any, hasIPv4NonLocalhasIPv4Any, hasIPv6Local, hasIPv4Local] = await getHasIP(); |
| 963 | 963 | |
| 964 | 964 | hasIPv6 = listen ? hasIPv6NonLocalhasIPv6Any : hasIPv6Local; |
| 965 | 965 | if (enableIPv6 === 'auto') { |
| 966 | 966 | useIPv6 = hasIPv6; |
| 967 | 967 | } |