fix snark sort by rate of stopped torrents

This commit is contained in:
zzz
2015-06-06 20:54:13 +00:00
parent 9f2ded6073
commit fb131a040c

View File

@ -322,16 +322,22 @@ class PeerCoordinator implements PeerListener
*/ */
public long getDownloadRate() public long getDownloadRate()
{ {
if (halted)
return 0;
return getRate(downloaded_old); return getRate(downloaded_old);
} }
public long getUploadRate() public long getUploadRate()
{ {
if (halted)
return 0;
return getRate(uploaded_old); return getRate(uploaded_old);
} }
public long getCurrentUploadRate() public long getCurrentUploadRate()
{ {
if (halted)
return 0;
// no need to synchronize, only one value // no need to synchronize, only one value
long r = uploaded_old[0]; long r = uploaded_old[0];
if (r <= 0) if (r <= 0)