8000 Upload length is wrong after pausing and unpausing · Issue #1486 · aria2/aria2 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Upload length is wrong after pausing and unpausing #1486
Closed
@sbruder

Description

@sbruder

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

  1. Add a torrent to aria2 (preferably one noone else is seeding/downloading)
  2. Download this torrent (or just a part of it) from a different instance.
  3. Get the uploaded amount from the RPC (uploadLength)
  4. Pause the torrent
  5. Unpause it again
  6. 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0