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

32-bit signed int is not enough for transfer rates #7693

Open
HanabishiRecca opened this issue Jun 27, 2024 · 0 comments
Open

32-bit signed int is not enough for transfer rates #7693

HanabishiRecca opened this issue Jun 27, 2024 · 0 comments

Comments

@HanabishiRecca
Copy link
Contributor

HanabishiRecca commented Jun 27, 2024

libtorrent version (or branch): 2.0.10

platform/architecture: Linux x86-64

compiler and compiler version: gcc 14.1.1

As the title says, I'm actually able to acheive transfers rates more than 2 GiB/s in qBittorrent and exceed the max int32 value.
This leads to weird results. See qbittorrent/qBittorrent#21003 for details.

The root of the problem is fairly straghtforward:

int download_rate = 0;
int upload_rate = 0;

int download_payload_rate = 0;
int upload_payload_rate = 0;

Maybe it's time to promote the values to int64_t.

@HanabishiRecca HanabishiRecca changed the title 32-bit signed int is not enough for transfer speeds 32-bit signed int is not enough for transfer rates Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant