maxpool 1.24.10 → 1.24.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +10 -0
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import net from 'node:net';
|
|
4
|
+
|
|
5
|
+
// DUAL-STACK TUNING (2026-10-08). Node ≥20 enables happy-eyeballs with a 250ms
|
|
6
|
+
// per-family attempt timeout. On networks where IPv6 is degraded-but-not-dead and the
|
|
7
|
+
// IPv4 path needs >250ms to establish (measured today: every pool upstream call failed
|
|
8
|
+
// ETIMEDOUT in ~270ms while IPv4 alone answered in 3s — the whole fleet saw
|
|
9
|
+
// "connection dropped on every account (UPSTREAM_TTFB)"), 250ms aborts the fallback
|
|
10
|
+
// before IPv4 can win. 2000ms covers a slow IPv4 start; a healthy IPv6 still wins
|
|
11
|
+
// immediately, so well-connected networks are unaffected. Must run BEFORE any
|
|
12
|
+
// connection is opened, hence here at module top.
|
|
13
|
+
net.setDefaultAutoSelectFamilyAttemptTimeout(Number(process.env.MAXPOOL_FAMILY_ATTEMPT_MS) || 2000);
|
|
4
14
|
import { stat } from 'node:fs/promises';
|
|
5
15
|
import { spawn, spawnSync } from 'node:child_process';
|
|
6
16
|
import { createInterface } from 'node:readline';
|