mirror of
https://codeberg.org/YGGverse/psocks.git
synced 2026-03-31 16:35:28 +00:00
minor percentage logic correction
This commit is contained in:
parent
29895bf35a
commit
a630b20cf8
1 changed files with 5 additions and 1 deletions
|
|
@ -50,7 +50,11 @@ impl Snap {
|
||||||
rules,
|
rules,
|
||||||
request: Sum {
|
request: Sum {
|
||||||
total: request,
|
total: request,
|
||||||
percent: 100.0 - blocked_percent,
|
percent: if request == 0 {
|
||||||
|
0.0
|
||||||
|
} else {
|
||||||
|
100.0 - blocked_percent
|
||||||
|
},
|
||||||
},
|
},
|
||||||
blocked: Sum {
|
blocked: Sum {
|
||||||
total: blocked,
|
total: blocked,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue