From 7191f2bb4a0a9185c2a12d4e4c5690188c35f3c4 Mon Sep 17 00:00:00 2001 From: GFW-knocker <123458121+GFW-knocker@users.noreply.github.com> Date: Wed, 1 Jan 2025 13:52:57 +0330 Subject: [PATCH] Freedom: Fix noises delay (#4233) --- infra/conf/freedom.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infra/conf/freedom.go b/infra/conf/freedom.go index 14c09cc279db..3cf374096432 100644 --- a/infra/conf/freedom.go +++ b/infra/conf/freedom.go @@ -187,8 +187,8 @@ func ParseNoise(noise *Noise) (*freedom.Noise, error) { if noise.Delay.From != 0 && noise.Delay.To != 0 { NConfig.DelayMin = uint64(noise.Delay.From) NConfig.DelayMax = uint64(noise.Delay.To) - if NConfig.DelayMin > NConfig.LengthMax { - NConfig.DelayMin, NConfig.DelayMax = NConfig.LengthMax, NConfig.DelayMin + if NConfig.DelayMin > NConfig.DelayMax { + NConfig.DelayMin, NConfig.DelayMax = NConfig.DelayMax, NConfig.DelayMin } } else { return nil, errors.New("DelayMin or DelayMax cannot be zero")