Skip to content

Commit

Permalink
Freedom: Fix noises delay (#4233)
Browse files Browse the repository at this point in the history
  • Loading branch information
GFW-knocker authored Jan 1, 2025
1 parent 632e510 commit 7191f2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions infra/conf/freedom.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 7191f2b

Please sign in to comment.