Closed
Description
Expected Behavior
Aria2 should not change the amount of uploaded data the RPC returns when the torrent is paused and then unpaused again.
Current Behavior
Aria2 adds the amount uploaded in the current session to the uploaded amount (which already includes the current session) which distorts this metric making it unable to rely on.
Steps to Reproduce
- Add a torrent to aria2 (preferably one noone else is seeding/downloading)
- Download this torrent (or just a part of it) from a different instance.
- Get the uploaded amount from the RPC (
uploadLength
) - Pause the torrent
- Unpause it again
- Get the uploaded amount
The second time the uploaded amount is queried from the RPC it will be doubled from the first time. When trying steps 2 – 6 in a new session (with the same metadata file using --force-save
) the amount will increase by the amount of data uploaded in the new session.
This is how I did it:
$ curl -s -X POST -d '{"jsonrpc": "2.0", "id": "", "method": "aria2.tellActive"}' http://localhost:6800/jsonrpc | jq '.result[] | .gid,.uploadLength'
"9aff7e0f2c3d88cb"
"2031616"
$ # downloading the file from a different instance
$ curl -s -X POST -d '{"jsonrpc": "2.0", "id": "", "method": "aria2.tellActive"}' http://localhost:6800/jsonrpc | jq '.result[] | .gid,.uploadLength'
"9aff7e0f2c3d88cb"
"2179779"
$ curl -s -X POST -d '{"jsonrpc": "2.0", "id": "", "method": "aria2.pause", "params": ["9aff7e0f2c3d88cb"]}' http://localhost:6800/jsonrpc
{"id":"","jsonrpc":"2.0","result":"9aff7e0f2c3d88cb"}
$ curl -s -X POST -d '{"jsonrpc": "2.0", "id": "", "method": "aria2.unpause", "params": ["9aff7e0f2c3d88cb"]}' http://localhost:6800/jsonrpc
{"id":"","jsonrpc":"2.0","result":"9aff7e0f2c3d88cb"}
$ curl -s -X POST -d '{"jsonrpc": "2.0", "id": "", "method": "aria2.tellActive"}' http://localhost:6800/jsonrpc | jq '.result[] | .gid,.uploadLength'
"9aff7e0f2c3d88cb"
"2327942"
My aria2 version is 1.34.0 (from debian testing).
Metadata
Metadata
Assignees
Labels
No labels