forked from premiere/premiere-libtorrent
dht_stats fix (truncates the log file on startup)
This commit is contained in:
parent
233f2ed00c
commit
a4dc107658
|
@ -342,7 +342,7 @@ namespace libtorrent { namespace dht
|
||||||
int peers = 0;
|
int peers = 0;
|
||||||
std::for_each(m_dht.begin_data(), m_dht.end_data(), count_peers(peers));
|
std::for_each(m_dht.begin_data(), m_dht.end_data(), count_peers(peers));
|
||||||
|
|
||||||
std::ofstream pc("dht_stats.log", std::ios_base::app | std::ios_base::trunc);
|
std::ofstream pc("dht_stats.log", first ? std::ios_base::trunc : std::ios_base::app);
|
||||||
if (first)
|
if (first)
|
||||||
{
|
{
|
||||||
first = false;
|
first = false;
|
||||||
|
|
Loading…
Reference in New Issue