Skip to content

Commit

Permalink
fix mmm noise delay
Browse files Browse the repository at this point in the history
a typo cause delayMin always set to 0
  • Loading branch information
GFW-knocker committed Dec 31, 2024
1 parent 483c9bb commit b28e115
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 @@ -268,8 +268,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 b28e115

Please sign in to comment.