Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#3934 closed Bug (fixed)

"manual reannounce" doesn't work if the initial announce failed

Reported by: jordan Owned by: jordan
Priority: Normal Milestone: 2.20
Component: libtransmission Version: 2.13
Severity: Normal Keywords:
Cc:

Description

This is a spinoff from ticket #3870, which is about automatic announces not coming frequently enough when a 404 is encountered.

The problem with manual reannounces is that tierCanManualAnnounce() checks tier->isRunning rather than tor->isRunning to see if a manual announce is allowed:

  • tor->isRunning: we are inbetween periods where the user pressed "start" and "stop."
  • tier->isRunning: we are inbetween periods where we've successfully announced "started" and "stopped." This is deliberately out-of-sync from tor->isRunning because it tracks the state of the tier, which may take awhile to complete its announces.

Since "tier->isRunning" relies on a successful "started" announce, it becomes impossible to manually reannounce if the first announce failed with a 404, a timeout, or some other error.

It also doesn't make sense to manually reannounce in the period after the user hit "stop" but before he "event=stopped" is sent.

So, for tr_announcerCanManualAnnounce() we should use tor->isRunning rather than tier->isRunning.

Change History (3)

comment:1 Changed 11 years ago by jordan

  • Status changed from new to assigned

comment:2 Changed 11 years ago by jordan

  • Resolution set to fixed
  • Status changed from assigned to closed

r11751

(trunk libT) #3934 "manual reannounce doesn't work if the initial announce failed" -- fixed.

Use tor->isRunning, rather than tier->isRunning, when testing to see if a torrent can manual announce or not. tor->isRunning means we're inbetween the user pressing "start" and "stop." tier->isRunning means we're inbetween successful "started" and "stopped" announcements. (This is deliberately out-of-sync from tor->isRunning because it can take awhile to for tracker announces to finish.)

Under the old code (using tier->isRunning), it was impossible to manually reannounce unless there had been a successful event=started announce first. It was also possible to manually announce after the "stop" button had been pressed if the "event=stopped" announcement hadn't finished yet.

comment:3 Changed 11 years ago by jordan

  • Summary changed from "manual reannounce" doesn't work if the initial announce failed with a 404 to "manual reannounce" doesn't work if the initial announce failed
Note: See TracTickets for help on using tickets.