I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit fb131a04 authored by zzz's avatar zzz
Browse files

fix snark sort by rate of stopped torrents

parent 9f2ded60
No related branches found
No related tags found
No related merge requests found
...@@ -322,16 +322,22 @@ class PeerCoordinator implements PeerListener ...@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment