dht_stats fix (truncates the log file on startup)

This commit is contained in:
Arvid Norberg 2009-01-01 18:29:42 +00:00
parent 233f2ed00c
commit a4dc107658
1 changed files with 1 additions and 1 deletions

View File

@ -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::ios_base::trunc);
std::ofstream pc("dht_stats.log", first ? std::ios_base::trunc : std::ios_base::app);
if (first)
{
first = false;