Skip to content

Commit

Permalink
More dht manager logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
rakshasa committed Oct 22, 2016
1 parent e02c6b2 commit 008561e
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/core/dht_manager.cc
Expand Up @@ -87,30 +87,25 @@ DhtManager::load_dht_cache() {
LT_LOG_THIS("cache file corrupted, discarding (path:%s)", cache_filename.c_str());
cache = torrent::Object::create_map();
} else {
LT_LOG_THIS("cache file loaded (path:%s)", cache_filename.c_str());
LT_LOG_THIS("cache file read (path:%s)", cache_filename.c_str());
}

} else {
LT_LOG_THIS("could not open cache file (path:%s)", cache_filename.c_str());
}

try {
torrent::dht_manager()->initialize(cache);

if (m_start == dht_on)
start_dht();
torrent::dht_manager()->initialize(cache);

} catch (torrent::local_error& e) {
LT_LOG_THIS("initialization failed (error:%s)", e.what());
}
if (m_start == dht_on)
start_dht();
}

void
DhtManager::start_dht() {
priority_queue_erase(&taskScheduler, &m_stopTimeout);

if (!torrent::dht_manager()->is_valid()) {
LT_LOG_THIS("server start skipped, manager is invalid", 0);
LT_LOG_THIS("server start skipped, manager is uninitialized", 0);
return;
}

Expand Down

0 comments on commit 008561e

Please sign in to comment.