forked from I2P_Developers/i2p.i2p
fix snark sort by rate of stopped torrents
This commit is contained in:
@ -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)
|
||||||
|
Reference in New Issue
Block a user