diff --git a/src/kademlia/dht_tracker.cpp b/src/kademlia/dht_tracker.cpp index 6b559f9c5..cd78209f6 100644 --- a/src/kademlia/dht_tracker.cpp +++ b/src/kademlia/dht_tracker.cpp @@ -342,7 +342,7 @@ namespace libtorrent { namespace dht int peers = 0; 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::ofstream pc("dht_stats.log", std::ios_base::app | std::ios_base::trunc); if (first) { first = false;