clears torrent stats when paused
This commit is contained in:
parent
7d18a3fd11
commit
16d56eaee6
|
@ -87,6 +87,14 @@ namespace libtorrent
|
|||
|
||||
size_type counter() const { return m_counter; }
|
||||
|
||||
void clear()
|
||||
{
|
||||
std::memset(m_rate_history, 0, sizeof(m_rate_history));
|
||||
m_counter = 0;
|
||||
m_total_counter = 0;
|
||||
m_rate_sum = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
@ -306,6 +314,12 @@ namespace libtorrent
|
|||
num_channels
|
||||
};
|
||||
|
||||
void clear()
|
||||
{
|
||||
for (int i = 0; i < num_channels; ++i)
|
||||
m_stat[i].clear();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
stat_channel m_stat[num_channels];
|
||||
|
|
|
@ -4112,6 +4112,7 @@ namespace libtorrent
|
|||
{
|
||||
// tell the tracker that we're back
|
||||
m_start_sent = false;
|
||||
m_stat.clear();
|
||||
announce_with_tracker();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue