mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-25 05:46:18 +00:00
fix(ui): keep an explicit zero happy-eyeballs delay across the round trip
Follow-up found in review: the wire normalizer still stripped
tryDelayMs when it equaled 0, but with the schema default now 250 a
reload rehydrates the missing field as 250 - a user who explicitly set
0 ("disabled", per the field's own placeholder) would see 250 and any
subsequent save would silently enable a delay they turned off. Keep
tryDelayMs on the wire unconditionally; it is the one happy-eyeballs
field whose presence changes xray's behavior.
Refs #5780
This commit is contained in:
@@ -267,7 +267,6 @@ export function normalizeSockoptForWire(
|
||||
const he = out.happyEyeballs;
|
||||
if (isRecord(he)) {
|
||||
const heOut: Record<string, unknown> = { ...he };
|
||||
if (heOut.tryDelayMs === 0) delete heOut.tryDelayMs;
|
||||
if (heOut.prioritizeIPv6 === false) delete heOut.prioritizeIPv6;
|
||||
if (heOut.interleave === 1) delete heOut.interleave;
|
||||
if (heOut.maxConcurrentTry === 4) delete heOut.maxConcurrentTry;
|
||||
|
||||
Reference in New Issue
Block a user