Opened 11 years ago
Closed 11 years ago
#2552 closed Bug (fixed)
Torrent state doesn't change automatically anymore
Reported by: | KyleK | Owned by: | charles |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | libtransmission | Version: | 1.76+ |
Severity: | Normal | Keywords: | |
Cc: |
Description
Whenever a torrent completes, there used to be a line in the logfile
State changed from "Incomplete" to "Complete"
This now doesn't happen automatically anymore. Only whenever I request the status of the daemon via "transmission-remote -l" or access the web interface, the state will be changed.
I noticed because my version uses the fireCompleteChange() callback to notify me of complete torrents, which now happens only whenever I open up the web UI.
Attachments (1)
Change History (8)
Changed 11 years ago by KyleK
comment:1 Changed 11 years ago by KyleK
comment:2 Changed 11 years ago by charles
- Milestone None Set deleted
- Status changed from new to assigned
Fixed in trunk for 1.80 by r9482. Thanks KyleK!
comment:3 Changed 11 years ago by charles
- Resolution set to fixed
- Status changed from assigned to closed
comment:4 Changed 11 years ago by charles
- Resolution fixed deleted
- Status changed from closed to reopened
....ah yes, now I remember why I took that line out.
r9482 has been reverted in r9484. We'll need to make a different solution for this ticket.
comment:5 Changed 11 years ago by KyleK
That problem already existed once, see ticket #1894.
comment:6 Changed 11 years ago by charles
Yep. What's happening is that we can't stop a torrent while we're in the middle of processing its socket I/O because those sockets and buffers are closed/freed when stopping.
In this case, what's happening is the torrent is being stopped when the torrent becomes complete because its stop ratio is already met. So we have to do something in bandwidthPulse() like we did for torrents that have an error.
comment:7 Changed 11 years ago by charles
- Resolution set to fixed
- Status changed from reopened to closed
Fixed in r9501
Changeset #9328 removed a call to tr_torrentRecheckCompleteness() from peer-mgr.c, which would get called everytime Transmission received block of data.
This is the reason why the state of a torrent doesn't automatically switches to "Complete" now. Only when you access the web UI, or call transmission-remote -l, this function is called (via tr_torrentGetActivity()), and the state changes.
Patch attached.