Opened 10 years ago

Last modified 6 years ago

#5092 new Bug

Transmission sends a 'stopped' event when pausing a torrent queued (but not running) via RPC

Reported by: cfpp2p Owned by:
Priority: Normal Milestone: None Set
Component: Transmission Version: 2.71
Severity: Normal Keywords:


A queued to download torrent that is not running will send a 'stopped' event even when the torrent isn't running. Seems like we need to have tr_torrentStop() always check first to see if the torrent is running before sending the the 'stopped' event. We need to fix these kind of problems in general from occurring. This is related to #4638 which did not fix the real problem.

Attachments (1)

q_annc_fix.diff (620 bytes) - added by cfpp2p 10 years ago.
the quick and dirty fix

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 years ago by cfpp2p

queued to seed, then pause also triggers this bug.

We need to fix this correctly.

It might be as easy as adding:

    if( tor->isRunning ) {
        tr_announcerTorrentStopped( tor );
    /*now it is OK to set isRunning flag */
        tor->isRunning = 0;

to stopTorrent()

and removing

tor->isRunning = 0;

from tr_torrentStop()

but I haven't tested this. Hmmm?? This may take a little more thought on how the isRunning flag is used within queuing...

Last edited 10 years ago by cfpp2p (previous) (diff)

Changed 10 years ago by cfpp2p

the quick and dirty fix

comment:2 Changed 10 years ago by cfpp2p

added: quick and dirty fix q_annc_fix.diff

comment:3 follow-up: Changed 10 years ago by jordan

Hm, I'm wondering if the first version wasn't clearer. isRunning and isQueued should be mutually exclusive, and testing for isRunning seems a little safer wrt blocking announces if a non-queued, non-running state comes through somehow.

Unless there's some nuance that I'm missing -- which is possible, it's 2am here :) -- it looks to me like we should test the one in comment:1, and use it if it works.

comment:4 in reply to: ↑ 3 Changed 10 years ago by cfpp2p

Replying to jordan:

... it looks to me like we should test the one in comment:1, and use it if it works.

As I remember that didn't work. If I remember correctly it was because queued torrent have their isRunning flags set to true.

The q_annc_fix.diff patch does work.

comment:5 Changed 9 years ago by blakemiller

Status on this? I still get this error via RPC. The diff looks like it ought to work, has this been attended to yet?

comment:6 Changed 8 years ago by shutopa

I still encounter this in 2.84, so I assume it has not yet been fixed. Was the solution presented above not good enough?

comment:7 Changed 6 years ago by cfpp2p

Still causing some private trackers to ban the client.

Note: See TracTickets for help on using tickets.