Registered Member
|
It seems that ktorrent doesn't send "stopped" event to the tracker on exit.
I take a look at the code that should doing this and I found that on exit is deleting the list with TorrentControl objects. OK, from destructors of these objects the stop function is invoked, but just after that is deleted and the tracker object, which should be responsible for delivering of the event. So as the consequence from deletion of the httptracker object the QHttp object is deleted and that close the connection. |
Moderator
|
This could be possible, the question is, can QHttp send the data before it's destroyed ? And does the tracker accept the data if the connection dies unexpectedly ? |
Registered Member
|
I think that we shouldn't worry about the tracker. We should ensure only that the data is transmited correctly before closing the connection.
I'm not sure, I should check Qt code, but I think that no data will be send if you invoke QHttp::request() and immediately after that delete the object. In the Qt documentation is written:
So to be sure that the "stopped" event is send to the tracker, on exit we should stop all currently running torrents, wait until requestFinished() signal is received, and then delete TorrentControl objects. The main problem here is increased time for exiting from KT. And this time will depend upon number of the running torrents. |
Registered users: bancha, Bing [Bot], Google [Bot], Sogou [Bot]