Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
KTorrent
Commits
c48d2213
Commit
c48d2213
authored
Oct 07, 2006
by
Joris Guisson
Browse files
Fixed bug with stalled timer, we now check on completed flag instead of bytes_left > 0
svn path=/branches/ktorrent/2.0/; revision=593297
parent
80d0e01b
Changes
1
Hide whitespace changes
Inline
Side-by-side
libktorrent/torrent/torrentcontrol.cpp
View file @
c48d2213
...
...
@@ -173,15 +173,17 @@ namespace bt
stats
.
completed
=
cman
->
chunksLeft
()
==
0
;
if
(
stats
.
completed
&&
!
comp
)
{
// download has just been completed
// only sent completed to tracker when we have all chunks (so no excluded chunks)
if
(
cman
->
haveAllChunks
())
tracker
->
completed
();
pman
->
killSeeders
();
QDateTime
now
=
QDateTime
::
currentDateTime
();
running_time_dl
+=
time_started_dl
.
secsTo
(
now
);
updateStatusMsg
();
updateStats
();
// download has just been completed
// only sent completed to tracker when we have all chunks (so no excluded chunks)
if
(
cman
->
haveAllChunks
())
tracker
->
completed
();
finished
(
this
);
}
else
if
(
!
stats
.
completed
&&
comp
)
...
...
@@ -226,8 +228,7 @@ namespace bt
// do a manual update if we are stalled for more then 2 minutes
// we do not do this for private torrents
if
(
stalled_timer
.
getElapsedSinceUpdate
()
>
120000
&&
stats
.
bytes_left
>
0
&&
!
stats
.
priv_torrent
)
if
(
stalled_timer
.
getElapsedSinceUpdate
()
>
120000
&&
!
stats
.
completed
&&
!
stats
.
priv_torrent
)
{
Out
()
<<
"Stalled for to long, time to get some fresh blood"
<<
endl
;
tracker
->
manualUpdate
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment