Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(minor) Bug: Users traffic exceed the limit. #1083

Closed
MJamshidnejad opened this issue Mar 12, 2024 · 3 comments
Closed

(minor) Bug: Users traffic exceed the limit. #1083

MJamshidnejad opened this issue Mar 12, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@MJamshidnejad
Copy link

Dear Alireza
Thank you for your attention. The problem is clear and the following picture is an example. I know it is not too important but I decided to share it with you.

Annotation 2024-03-09 122248

  • Platform: Docker
  • Version 1.7.2
@MJamshidnejad MJamshidnejad added the bug Something isn't working label Mar 12, 2024
@alireza0
Copy link
Owner

alireza0 commented Mar 12, 2024

Dear @MJamshidnejad,

Thank you for your report.
It is normal to have extra usage, but I have to enforce Remaining to show Zero or - instead.

@MJamshidnejad
Copy link
Author

Oh good point. I forgot to mention that. :) That problem is also exist in subscription reports.
Why is it normal? connected connections?

@alireza0
Copy link
Owner

alireza0 commented Mar 12, 2024

@MJamshidnejad it is normal in all accounting apps, because it is not possible to check the usage of the user on each millisecond or each byte of usage :)

This conditional code in subscription will avoid minus number:

if vol := stats.Total - (stats.Up   stats.Down); vol > 0 {
    remark = append(remark, fmt.Sprintf("%s%s", common.FormatTraffic(vol), "📊"))
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants