server: enable Happy Eyeballs IPv4/v6 selection

Whoever thought it was a good idea to have this disabled by default...
This commit is contained in:
Johann150 2024-10-14 15:24:11 +02:00
parent 0569bc3e15
commit bc841ec965
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -1,4 +1,5 @@
import cluster from 'node:cluster';
import net from 'node:net';
import Xev from 'xev';
import Logger from '@/services/logger.js';
@ -25,6 +26,8 @@ export async function boot(): Promise<void> {
process.title = `Foundkey (${process.env.mode})`;
}
net.setDefaultAutoSelectFamily(true);
if (cluster.isPrimary || envOption.disableClustering) {
await masterMain();